-
Notifications
You must be signed in to change notification settings - Fork 27
rulesets: add default branch protection for all repositories #145
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
Conversation
|
I tried adding to the Thus I can't test what the response looks like etc. Since this is only a single rule, maybe exporting it once is not too bad. Alternatively, @infinisil, you could look into that and adjust the export script accordingly. |
|
I just did a survey of force pushes in the last year. Results:
|
|
For my force pushes, that's when I set up the repo. I wouldn't have had any problem with being blocked from force pushing. |
|
We are certainly OK with not being able to force-push for nixpkgs-merge-bot. |
|
Btw I updated the links above to use the |
|
Even without explicit feedback otherwise, I don't think these force pushes are required per-se for the mentioned repos. Personally, I'd feel confident to still go ahead with this. |
|
We will need better tooling for applying rulesets before expanding this to all the repos. Otherwise it's going to be too much overhead for the org team. |
|
No, this is an org-wide default branch protection ruleset, that will be applied once at the org level and will then apply to every repo's default branch only. It is very basic and not much work. |
infinisil
left a comment
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.
Let's go for this, needs approval from another org owner though
zimbatm
left a comment
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.
Alright, in that case sounds good 👍
This adds a default branch protection ruleset for *all* (existing and future) repositories in the NixOS org. It only targets the default branch and disallows deletion and force pushes.
d456a7e to
7141f87
Compare
|
Applied |
This adds a default branch protection ruleset for all (existing and future) repositories in the NixOS org. It only targets the default branch and disallows deletion and force pushes.
This seems like a reasonable default and I doubt that any repositories depend on being able to do either of that. And if they do, it's doubtful, whether these repositories are in the right place in the NixOS org.
This needs to be imported on the organization level, via Settings -> Repository -> Rulesets.