Skip to content

Commit

Permalink
Update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
begonaguereca committed Oct 2, 2024
1 parent 951b0c7 commit 2d85d53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Octoshift/Services/GithubApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ public virtual async Task<int> GetIdpGroupId(string org, string groupName)
var url = $"{_apiUrl}/orgs/{org.EscapeDataString()}/external-groups";

var response = await _client.GetAllAsync(url)
.SingleAsync(x => ((string)x["group_name"]).ToUpper() == groupName.ToUpper());
.SingleAsync(x => GroupNames(x["group"], groupName));

return (int)response["group_id"];
}
Expand Down Expand Up @@ -1177,4 +1177,8 @@ private static CodeScanningAlertInstance BuildCodeScanningAlertInstance(JToken s
StartColumn = (int)scanningAlertInstance["location"]["start_column"],
EndColumn = (int)scanningAlertInstance["location"]["end_column"]
};
private static bool GroupNames(dynamic x, string groupName)
{
return ((string)x["group_name"]).ToUpper() == groupName.ToUpper();
}
}

0 comments on commit 2d85d53

Please sign in to comment.