paritytech / pr-custom-review

GitHub Action for complex pull request approval cases that are not currently supported by the Branch protection feature in GitHub.
MIT License
8 stars 4 forks source link

Protect release branches #134

Closed ggwpez closed 1 year ago

ggwpez commented 1 year ago

All substrate branches with prefix polkadot-v and all Polkadot branches with prefix release-v should require approval from @coderobe or @chevdor.

I could not find such an option in the GitHub branch protection, but we need this since the release branches keep getting pushed without coordination.

### Tasks
mordamax commented 1 year ago

@ggwpez in gh team/enterprise plan they seem to have rulesets, which can make this happen. PR custom review, is only for PRs, and it can't prevent push or creation

this is test from https://github.com/paritytech-stg/polkadot-sdk/settings/rules/55406

image

@paritytech-ci @lovelaced could you please take a look and help to configure this ?

coderobe commented 1 year ago

This would be extremely useful, both accidental and intentional circumvention happens way too frequently. Whichever solution we have should allow @paritytech/release-engineering to push/approve

lovelaced commented 1 year ago

Right, if everyone agrees I can put this in place on both polkadot and substrate. There's a few more items I need to know the details of here:

Screenshot_20230725-091818.png

coderobe commented 1 year ago

@lovelaced that looks good to me as-is

lovelaced commented 1 year ago

Okay, rules have been created and are enforcing. Please let me know if something isn't behaving as expected

lovelaced commented 1 year ago

Currently each is resolving to these branches being enforced under the rulesets:

polkadot: Screenshot_20230725-093739.png

substrate: Screenshot_20230725-093724.png

coderobe commented 1 year ago

i think you might have the targets the wrong way around

lovelaced commented 1 year ago

Oops so it is. Fixed

coderobe commented 1 year ago

Thanks 🙏

ggwpez commented 1 year ago

Looks like we cannot merge this now because of some rule https://github.com/paritytech/polkadot/pull/7571.

Screenshot 2023-08-02 at 11 57 58

I think this "Only allow users with bypass permission to update matching refs" means that only Admins can actually merge anything, or?

coderobe commented 1 year ago

Looks like we cannot merge this now because of some rule paritytech/polkadot#7571.

Screenshot 2023-08-02 at 11 57 58

I think this "Only allow users with bypass permission to update matching refs" means that only Admins can actually merge anything, or?

No, releng can :) merged ^^

ggwpez commented 1 year ago

Okay good, thanks!