Commit Graph

8 Commits

Author SHA1 Message Date
Maksym H 61d45ed72b Update review-trigger.yml (#4137)
Followup after https://github.com/paritytech/polkadot-sdk/pull/3431
Per
https://stackoverflow.com/questions/63188674/github-actions-detect-author-association
and https://michaelheap.com/github-actions-check-permission/
looks like just checking NOT a MEMBER is not correct, Not a CONTRIBUTORs
check should be included
2024-04-16 10:11:22 +00:00
Javier Bullrich dd5dbf3902 added check to ensure there are approvals (#4152)
Follow up to #3431

Added an api check to verify that there are pre-existing approvals in
the PR before dismissing reviews and posting a message
2024-04-16 10:10:12 +00:00
Javier Bullrich 8b4cfda758 added script to require a review post push (#3431)
Closes https://github.com/paritytech/opstooling/issues/174

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 member of the org,
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.

Find the requested issue linked to this PR (it is from a private repo so
I can't link it here)
2024-04-15 13:46:14 +00:00
Alexander Samusev 2bdf5dca67 [ci] Remove unused jobs (#2502)
<del>PR custom review is deprecated. Now `review-bot` performs these
functions.</del>
PR removes unused ci jobs and adjusts zombienet jobs for merge queues

cc @Bullrich
2024-01-11 11:30:17 +00:00
Alexander Samusev 5b0622bc4d [CI] Prepare CI for Merge Queues (#2308)
PR prepares CI to the GitHub Merge Queues. All github actions that were
running in PR adjusted so they can run in the merge queues. Zombienet
jobs will do nothing during PRs but they will run during merge queues.

Jobs that will be skipped during PR:
 - all zombienet jobs
 - all publish docker jobs

Jobs that will be skipped during merge queue:
 - check-labels
 - check-prdoc
 - pr-custom-review
 - review trigger

cc https://github.com/paritytech/ci_cd/issues/862
2023-11-15 14:28:32 +01:00
Javier Bullrich 8d2637905b review-bot: trigger only on review approvals (#2289)
Moved the review event of review-bot to only be triggered in approvals.

Because we only update the required reviews when someone approves, this
will stop the bot from immediately requesting a new review when someone
comments or request changes as they should have been already notified in
the first batch.
2023-11-13 22:17:36 +02:00
Javier Bullrich e9987401f3 skip trigger for review bot on draft PRs (#2145)
Added if condition on review-bot's trigger so it does not trigger in
`draft` PRs.
2023-11-03 13:43:29 +01:00
Javier Bullrich 1cf7d3aafa upgraded review bot to v2.1.0 (#1908)
Upgraded to version 2.1.0 which has paritytech/review-bot#94, a change
in the logic of the action to overcome some problems with permissions
coming from PRs from forks

For this, we needed to divide the actions into two files:
- A first action that triggers on PRs and reviews and uploads the PR
number.
- A second action which is triggered under the completion of the first
one and runs as the action normally runs (but won't have any problems
regarding permissions because it is triggered from the master branch)
2023-10-18 14:04:39 +02:00