Skip to content

Commit

Permalink
Avoid getting user when anonymous (#2074)
Browse files Browse the repository at this point in the history
Resolves regressions #2008 and #2014 introduced in #1029

Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Keegan Campbell <[email protected]>
  • Loading branch information
mnencia and kfcampbell authored Jan 5, 2024
1 parent b544e31 commit 7411f66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions github/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ func (c *Config) ConfigureOwner(owner *Owner) (*Owner, error) {
ctx := context.Background()
owner.name = c.Owner
if owner.name == "" {
if c.Anonymous() {
return owner, nil
}
// Discover authenticated user
user, _, err := owner.v3client.Users.Get(ctx, "")
if err != nil {
Expand Down

0 comments on commit 7411f66

Please sign in to comment.