-
Notifications
You must be signed in to change notification settings - Fork 2
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
Apply branch protection to our repos #198
Comments
Still need to identify exactly what branch protection we need and to which groups they should apply. |
github-actions seems to be pretty easy to handle, it seems like have the "Organisation admin" role meaning we can use that (or the lower "Repository admin", "Maintain", or "Write" roles) as a bypass for any rulesets I tested this by using the gha-tag-release action on a test repo on my personal account that has a tag ruleset applied to it. Without the bypass I got a 422, though with the "Organisation admin" role as a bypass the github-actions user was able to do its thing |
I've created a PR to update module standardiser to update the rulesets, though I haven't run it yet since we probably need to update all the users first Once we run the new module-standardariser ruleset command, PRs will now requires to 2 approvers to merge unless your role has enough permissions to bypass I've put this into peer review with the assumption that there are too many ACs on this card, which I've now split into 3 categories, and we should later move this card back into refinement. |
Looks like @maxime-rainville probably needs to take a look and decide whether the core committer stuff should be removed from this card (probably handle it in silverstripeltd/product-issues#842 instead). We don't want to do part of a card, and then move the card into refinement. |
Can core commiter still approved and merge things with branch protection on? Do they need to a second approver? I would like to remove ownership from external core committers, but at the same time I want to make sure we don't end up just treating them as regular reviewers. If that's the case, I'm fine with closing this card and carrying the conversation on the next one. |
Right now core committers are owners, so they can do whatever the heck they want. 😅 There are at least two separate cards talking about changing what core committers can do. I reocmmend we deal with changing their access separately from introducing these branch protection rules. |
Me satisfied. |
Actually lets apply branch protection first. |
Having a second look, there's also the "regular branch protection" that's already on all the supported repos - e.g. https://github.com/silverstripe/silverstripe-admin/settings/branches I think this should remain as is with the the existing pattern match to prevent accidental deletion of existing 2 / 2.1 style branches. If we don't keep it then admins can accidentally delete the branches despite the new branch rulesset that restricts deletion because admins will have bypass permissions. Even without the checking the tickbox "Do not allow bypassing the above settings - The above settings will apply to administrators and custom roles with the "bypass branch protections" permission.", I was unable to delete a |
Yup, I think the implication is that this card is just to add additional branch protection on top of whatever is already there. |
Annoyingly there isn't a REST api endpoint available to update the old fashioned branch protection using an fnmatch pattern, you can only update it for existing branches. I've gone and manually checked and updated branch protection for the list of supported modules in repositories.json (all 138 of them) and ensured there is branch protection. I added branch protection for a couple of dozen for the newer or peripheral modules that did not have it However I was unable to access the repo settings to do this for all o f the non-silverstripe account repos such as symbiote, so presumably we probably also won't be able to add the branch/tag rulesets for them via the API either |
@emteknetnz I'm confused about the status of this now - there's a PR but you can't automate it and have already applied the branch protection manually?
Does this mean we can't automate applying branch protection rules at all?
So are all of the branch protection rules applied now? |
There are two types of branch protection
|
PRs merged. Reassigning to Steve to run the new command in standardiser |
Have run module-standariser, went smoothly |
Acceptance criteria
Notes (already decided)
Related card
PRs
The text was updated successfully, but these errors were encountered: