Open GabeMillikan opened 1 year ago
Hello, this is how I set this up:
on:
pull_request_review:
and not
on:
pull_request:
Pull requests already require 1 approval because of the branch protection rule, so the action will run when this first approval comes. If the tag requires more than 1 approval it will fail and wait for more approvals to come, if no it won't block the pr, but the action is set to run only when approvals come.
I hope this can help you!
Thank you! Is it possible to make the check re-run automatically if the tag changes?
Thank you! Is it possible to make the check re-run automatically if the tag changes?
This could work:
on:
pull_request_target:
types:
- labeled
I have installed the action in accordance with the README.md, such that I have 3 labels: label
a
requires 0 reviews labelb
requires 1 reviews labelc
requires 2 reviewsSteps to reproduce the unexpected behavior:
b
label (such that 1 review is required)pull_request
) fails (expectedly, since there are no reviews) and I cannot mergepull_request_review
) succeeds (due to the approval) but the previouspull_request
check is still present and failed and I still cannot mergeIs it possible to fix this (without manually re-running the checks)?
Click to see my (very standard) configuration
# `.github/workflows/label-reviews.yml` ```yml # This workflow will set a number or reviewers depending on the labels name: Label Reviews # Trigger the workflow on pull requests on: pull_request: types: - opened - reopened - synchronize - labeled - unlabeled pull_request_review: types: - submitted - edited - dismissed jobs: require-reviewers: # Optional: skip check if no relevant label is present # This needs to be kept in sync with the labels being checked runs-on: ubuntu-latest steps: - name: Require-reviewers uses: travelperk/label-requires-reviews-action@1.3.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: rules_yaml: | # define which PR labels require how many aprroving reviewers a: 0 b: 1 c: 2 ``` # repository settings ![image](https://github.com/travelperk/label-requires-reviews-action/assets/44247924/94e36ba4-97b6-480d-991b-55f9c0dbf89a)