Browse Source

Merge 90afcada2f into 12339f2cef

pull/4641/merge
Venkat 14 hours ago committed by GitHub
parent
commit
2bf7dcc115
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      connector/github/github.go

5
connector/github/github.go

@ -700,7 +700,7 @@ type org struct {
func (c *githubConnector) teamsForOrg(ctx context.Context, client *http.Client, orgName string) ([]string, error) {
apiURL, groups := c.apiURL+"/user/teams", []string{}
for {
// https://developer.github.com/v3/orgs/teams/#list-user-teams
// https://docs.github.com/en/rest/teams/teams?apiVersion=2026-03-10#list-teams-for-the-authenticated-user
var (
teams []team
err error
@ -710,7 +710,8 @@ func (c *githubConnector) teamsForOrg(ctx context.Context, client *http.Client,
}
for _, t := range teams {
if t.Org.Login == orgName {
// case-insensitive check to avoid silent failures when config casing is different than GitHub
if strings.EqualFold(t.Org.Login, orgName) {
groups = append(groups, c.teamGroupClaims(t)...)
}
}

Loading…
Cancel
Save