Skip to content

Commit

Permalink
Merge pull request #50 from OpenRailAssociation/fix-collaborator-bug
Browse files Browse the repository at this point in the history
Fix capitalisation bug when comparing collaborator permissions
  • Loading branch information
mxmehl authored Aug 23, 2024
2 parents 0f919dc + 207acb1 commit 192fdad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gh_org_mgr/_gh_org.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,8 @@ def _get_configured_repos_and_user_perms(self):

# Add team member to repo with their repo permissions
for team_member in team_members:
# Lower-case team member
team_member = team_member.lower()
# Check if permissions already exist
if self.configured_repos_collaborators[repo].get(team_member, {}):
logging.debug(
Expand All @@ -891,7 +893,7 @@ def _get_configured_repos_and_user_perms(self):
)
)
else:
self.configured_repos_collaborators[repo][team_member.lower()] = perm
self.configured_repos_collaborators[repo][team_member] = perm

def _convert_graphql_perm_to_rest(self, permission: str) -> str:
"""Convert a repo permission coming from the GraphQL API to the ones
Expand Down

0 comments on commit 192fdad

Please sign in to comment.