-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Auth] Revert unintentional commits on main #14108
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll double check the branch rules to see if I can find anything unexpected.
Don't see anything. Even force push seems to be disabled. |
I see that we have admin roles and admin roles are allowed to bypass branch protections. |
Settings > Teams and Member roles > Admin |
We could always uncheck it if needed so I'm thinking it's worth checking this to avoid accidental pushes to main? |
SGTM |
SG, I enabled it and did a quick test: nickcooke@nickcooke-mac firebase-ios-sdk % git commit -m "[NFC] Test branch protection"
[main 35bbafb41] [NFC] Test branch protection
1 file changed, 1 insertion(+)
nickcooke@nickcooke-mac firebase-ios-sdk % git push origin HEAD
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 536 bytes | 536.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote:
remote: - Changes must be made through a pull request.
remote:
remote: - 2 of 2 required status checks are expected.
To github.com:firebase/firebase-ios-sdk.git
! [remote rejected] HEAD -> main (protected branch hook declined)
error: failed to push some refs to 'github.com:firebase/firebase-ios-sdk.git' |
I unintentionally pushed to main (wasn't on a local branch). Usually, it stops me. I didn't force push but I saw
remote: Bypassed rule violations for refs/heads/main:
.#no-changelog