Branch protection rule does not update push access list when team is removed

Hi GitHub Support!

In a branch protection rule, I have a user that is allowed to push to matching branches. That user has access as it is a valid collaborator for this repository. Now there are 2 different behaviors:

  1. If the user is added as a direct collaborator member (not as part of a team) and if I remove this user from my collaborators, the branch protection rule is properly updated and the respective user is removed from the list of users that are allowed to push to matching branches.

  2. If the user is added as part of a team and I remove the team from my collaborators, the branch protection rule is not properly updated and I can still see the user in the list of users allowed to push to matching branches. The branch protection rule has an invalid status.

Expected behavior is that the use-case 2 behaves as the use-case 1. User should be removed from the list of users allowed to push to matching branches inside all branch protection rules if that user has not access for this repository.

Thanks for all your help!

Hi @iopar, welcome and thanks for being here! The behaviour you’ve described sounds like a known issue with branch protection, however I recommend contacting our support team directly so we can investigate further and confirm if that is indeed the case.

Should you open a support ticket with us, please share details of the repository and users affected so we can look into the problem further.

Hi @vgrl, thank you for your reply. I have already contacted GitHub support team and created a ticket.
https://support.github.com/ticket/personal/0/1150969 (not sure if you have access to it). Currently it’s closed due to its priority and someone from GitHub Support assured me that it’s still tracked in your internal system.

Hi @iopar, thank you I can indeed see the internal issue where we are tracking reports like yours for this particular issue.

Thanks again for the detailed report and for updating this post!