Skip to content
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

Merged
merged 2 commits into from
Nov 13, 2024
Merged

[Auth] Revert unintentional commits on main #14108

merged 2 commits into from
Nov 13, 2024

Conversation

ncooke3
Copy link
Member

@ncooke3 ncooke3 commented Nov 13, 2024

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

Copy link
Contributor

@andrewheard andrewheard left a 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.

@ncooke3 ncooke3 merged commit 709a685 into main Nov 13, 2024
54 checks passed
@ncooke3 ncooke3 deleted the nc/reverts branch November 13, 2024 16:56
@andrewheard
Copy link
Contributor

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.

@ncooke3
Copy link
Member Author

ncooke3 commented Nov 13, 2024

I see that we have admin roles and admin roles are allowed to bypass branch protections.

@ncooke3
Copy link
Member Author

ncooke3 commented Nov 13, 2024

Settings > Teams and Member roles > Admin

@ncooke3
Copy link
Member Author

ncooke3 commented Nov 13, 2024

Ah, we could make turn off the ability to bypass branch protections:

branches > main > edit > scroll down and see:

Screenshot 2024-11-13 at 12 01 57 PM

@ncooke3
Copy link
Member Author

ncooke3 commented Nov 13, 2024

We could always uncheck it if needed so I'm thinking it's worth checking this to avoid accidental pushes to main?

@paulb777
Copy link
Member

SGTM

@ncooke3
Copy link
Member Author

ncooke3 commented Nov 13, 2024

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'

@firebase firebase locked and limited conversation to collaborators Dec 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants