Skip to content

Commit

Permalink
Merge pull request #402 from jenkins-x/giteaadmin
Browse files Browse the repository at this point in the history
fix: use gitea admin
  • Loading branch information
jenkins-x-bot committed Aug 23, 2023
2 parents d23a2b1 + 4939dd8 commit 218168b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion scm/driver/gitea/testdata/issue.json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"Login": "string",
"Name": "string",
"Email": "[email protected]",
"Avatar": "string"
"Avatar": "string",
"isAdmin": true
}
],
"Closed": false,
Expand Down
11 changes: 6 additions & 5 deletions scm/driver/gitea/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ func convertUser(src *gitea.User) *scm.User {
return nil
}
return &scm.User{
ID: int(src.ID),
Login: src.UserName,
Name: src.FullName,
Email: src.Email,
Avatar: src.AvatarURL,
ID: int(src.ID),
Login: src.UserName,
Name: src.FullName,
Email: src.Email,
Avatar: src.AvatarURL,
IsAdmin: src.IsAdmin,
}
}

0 comments on commit 218168b

Please sign in to comment.