mirror of
https://github.com/GTNewHorizons/GTNH-Actions-Workflows.git
synced 2025-07-01 18:01:28 +02:00
Label reviews (#29)
* testing things * fix labeling and use custom working version * Use GTNH repo
This commit is contained in:
parent
9362d88e68
commit
1aec8967d3
36
.github/workflows/label-reviews.yml
vendored
Normal file
36
.github/workflows/label-reviews.yml
vendored
Normal file
@ -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: GTNewHorizons/label-requires-reviews-action@master
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user