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

Allow check to run without needing the enforce branch protection rules #446

Open
tugboat-m opened this issue Mar 8, 2023 · 3 comments
Open

Comments

@tugboat-m
Copy link

image

I have a scenario wherein branch usage prevents the branch protection rule "Require pull request reviews before merging". However, the check is still needed on pull requests going into the branch mentioned.
ie:

  • master
  • epic/some-epic
  • feature/some-feature

In the above, feature/some-feature is to merge into epic/some-epic but, epic branch rules do not and cannot enforce "Require pull request reviews before merging" as this prevents developers from updating epic branches with "master" without a PR.
In addition to this, the check does not dismiss outdated reviews which is desirable but, not possible without the PR requirement rule.

So, can functionality be added such that:

  1. the branch protection rule is not required
  2. a mechanism to fake dismissal of outdated reviews (approvals)
  • ie: the approval count tracking approvals is reset if the approval timestamp is after the most recent commit
@namelivia
Copy link
Collaborator

namelivia commented Mar 9, 2023

Hello! Just to verify I understood your request correctly, there are two issues here:

On one hand, you would like to timestamp the reviews and expire them if a new commit is applied on top?
And in the other hand, you would like to enforce Required approving reviews for other branches than master (i.e. epic branches).

Did I understand it correctly?

@tugboat-m
Copy link
Author

sorry about describing two issues in one GH issue thread 😓

On one hand, you would like to timestamp the reviews and expire them if a new commit is applied on top?

Correct, essentially mimic the "Dismiss stale pull request approvals when new commits are pushed" without needing to check "Require pull request reviews before merging" to then check the "Dismiss stale.." rule.

And in the other hand, you would like to enforce Required approving reviews for other branches than master (i.e. epic branches).

Correct, I think. The idea is to not make the branch protection rule "Require pull request reviews before merging" a requirement. If this does not need to actually be done then that is great, the mimic of "Dismiss..." to ensure accurate approval status is the core issue being faced.

@namelivia
Copy link
Collaborator

Nice, sounds reasonable to me, however, I don't think I'll have availability to work on this anytime soon. But I'll put it in my backlog for later, I hope you can understand.

If you want to try to do it yourself feel free, and I'll be happy to assist you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants