Skip to content

Fix KeyError when team becomes empty#189

Merged
mxmehl merged 1 commit intomainfrom
fix-repo-keyerror
Apr 23, 2026
Merged

Fix KeyError when team becomes empty#189
mxmehl merged 1 commit intomainfrom
fix-repo-keyerror

Conversation

@mxmehl
Copy link
Copy Markdown
Member

@mxmehl mxmehl commented Apr 23, 2026

In OrgChanges.update_repo, the guard condition initialising a new RepoChanges entry checked self.teams instead of self.repos. This caused a KeyError when a repository name did not coincide with any team name, most commonly triggered during collaborator permission synchronisation after a team became empty and its last member was removed.

@mxmehl mxmehl changed the title fix: check self.repos instead of self.teams in update_repo Fix KeyError when team becomes empty Apr 23, 2026
@mxmehl mxmehl merged commit 9c30810 into main Apr 23, 2026
13 checks passed
@mxmehl mxmehl deleted the fix-repo-keyerror branch April 23, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant