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

[Feature Request]: Check rulesets for branch protection rules #475

Open
pritchyspritch opened this issue Nov 24, 2023 · 2 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed needs design

Comments

@pritchyspritch
Copy link

pritchyspritch commented Nov 24, 2023

Currently it appears that allstar is not checking the GitHub rulesets active on a repository. Rulesets can be used to set branch protection rules on a repository and the details of it are obtained via a different API endpoint to the standard branch protection rules. This means that currently allstar can fail on branch protection rules, even when they've been implemented via rulesets.

As a user
I would like allstar to check for branch protection rules from both sets of data
So that I am not alerted for failing to implement branch protection when it's been implemented by a ruleset

As mentioned by @jeffmendoza I think combining the rulesets with branch protections policy makes sense as they do the same thing just in different ways.

Thanks :)

Initial question to investigate lack of checking regarding rulesets:

Hey 👋🏻

I've started to implement branch protection rules on repos via GitHub rulesets, rather than the original way of setting the protection and allstar has started raising issues saying they don't exist.

Is that because allstar isn't checking for rulesets or because I'm still missing something? I did have a little read of the repo and couldn't find specific reference. If it's not checking rulesets, will this be implemented in future?

@jeffmendoza
Copy link
Member

Hi, thanks for asking! All the branch protection policy code here is from before rulesets came out. Looks like it is a separate API, and the code here does not see them.

I believe either combining ruleset checking with the current branch protection policy, or a new separate ruleset policy makes sense for Allstar. Feel free to open up a new feature-request issue (or edit this one) with any thoughts on how you would like to see it work out.

@pritchyspritch pritchyspritch changed the title Check rulesets for branch protection rules Feature Request: Check rulesets for branch protection rules Nov 27, 2023
@pritchyspritch pritchyspritch changed the title Feature Request: Check rulesets for branch protection rules [Feature Request]: Check rulesets for branch protection rules Nov 27, 2023
@raghavkaul raghavkaul added enhancement New feature or request needs design labels Mar 11, 2024
@jeffmendoza jeffmendoza added the help wanted Extra attention is needed label Jun 21, 2024
@rahearn
Copy link

rahearn commented Jul 22, 2024

FWIW - I would vote for using the same allstar policy for both classic branch protection and rulesets. We have split use of the two features in our org and having to maintain opt-out/in lists for separate policies or forcing everyone into the same implementation would both be onerous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed needs design
Projects
None yet
Development

No branches or pull requests

4 participants