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

Label reviews #29

Merged
merged 3 commits into from
Oct 18, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/label-reviews.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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
# These don't need to hold the entire label name and aren't case sensitive
if: ${{ contains(github.event.pull_request.labels.*.name, 'Affects Balance') || contains(github.event.pull_request.labels.*.name, 'ongoing freeze') }}
runs-on: ubuntu-latest
steps:
- name: Label requires reviews
uses: BlueWeabo/label-requires-reviews-action@master
BlueWeabo marked this conversation as resolved.
Show resolved Hide resolved
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# define which PR labels require how many aprroving reviewers
# Case sensitive and needs the full label name.
rules_yaml: |-
Affects Balance: 3
ongoing freeze - don't merge: 99