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

Dismiss approval on new changes #60

Closed
xlc opened this issue Oct 10, 2023 · 8 comments · Fixed by #76
Closed

Dismiss approval on new changes #60

xlc opened this issue Oct 10, 2023 · 8 comments · Fixed by #76

Comments

@xlc
Copy link
Contributor

xlc commented Oct 10, 2023

Do we want to dismiss approval on PR on new changes? Otherwise the PR author can change the PR to something else and merge it.

@bkchr
Copy link
Contributor

bkchr commented Oct 15, 2023

@Bullrich can you take care of this?

@Bullrich
Copy link
Contributor

Hi @bkchr, this is a check that can be enabled at the branch protection settings:

image

@bkchr
Copy link
Contributor

bkchr commented Oct 15, 2023

Ahh nice! Then I will enable this. Ty!

@bkchr
Copy link
Contributor

bkchr commented Oct 18, 2023

Done

@bkchr bkchr closed this as completed Oct 18, 2023
@bkchr
Copy link
Contributor

bkchr commented Oct 18, 2023

Okay, that is actually not working. This only removes approvals from people who approval rights in the repo. Thus, anyone outside approval isn't removed.

@bkchr bkchr reopened this Oct 18, 2023
@Bullrich
Copy link
Contributor

Okay, that is actually not working. This only removes approvals from people who approval rights in the repo. Thus, anyone outside approval isn't removed.

I did not know that. I will make a small action to handle this then 🙂

@Bullrich
Copy link
Contributor

@bkchr find PR with the requested feature:

fellowship-merge-bot bot pushed a commit that referenced this issue May 7, 2024
Added a script that will require new reviews in a PR if the author (who
is not a fellow) pushed a new commit.

Resolves #60

Copied from paritytech/polkadot-sdk#4152 and
paritytech/polkadot-sdk#3431


## Summary
Added a new step in the action that triggers review bot to stop approval
from new pushes.

This step works in the following way:
- If the **author of the PR**, who **is not** a fellow, pushed a new
commit then:
- Review-Trigger requests new reviews from the reviewers and fails.

It *does not dismiss reviews*. It simply request them again, but they
will still be available.

This way, if the author changed something in the code, they will still
need to have this latest change approved to stop them from uploading
malicious code.

- [x] Does not require a CHANGELOG entry
@mordamax
Copy link
Contributor

@bkchr this can be closed already?

@bkchr bkchr closed this as completed Aug 12, 2024
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

Successfully merging a pull request may close this issue.

4 participants