Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/connector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ func (gh *GitHub) Validate(ctx context.Context) (annotations.Annotations, error)
membership, _, err := gh.client.Organizations.GetOrgMembership(ctx, "", o)
if err != nil {
if filterOrgs {
return nil, fmt.Errorf("access token must be an admin on the %s organization", o)
return nil, fmt.Errorf("access token must be an admin on the %s organization: %w", o, err)
}
continue
}

// Only sync orgs that we are an admin for
if strings.ToLower(membership.GetRole()) != orgRoleAdmin {
if filterOrgs {
return nil, fmt.Errorf("access token must be an admin on the %s organization", o)
return nil, fmt.Errorf("access token must be an admin on the %s organization: %w", o, err)
}
continue
}
Expand Down
Loading