aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorboubou19 <miisterunknown@gmail.com>2024-09-07 01:05:08 +0200
committerGitHub <noreply@github.com>2024-09-07 01:05:08 +0200
commit8e89aa4a70c42c3b104115a598bb3ce45528578c (patch)
treef52867ff86f79bdc201f0a966465848339960645
parent1395aa31df55ff4c4fa6f141ba9a120bfc7cee6d (diff)
downloadGT5-Unofficial-8e89aa4a70c42c3b104115a598bb3ce45528578c.tar.gz
GT5-Unofficial-8e89aa4a70c42c3b104115a598bb3ce45528578c.tar.bz2
GT5-Unofficial-8e89aa4a70c42c3b104115a598bb3ce45528578c.zip
add label requirement (#3090)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
-rw-r--r--.github/workflows/labels.yml41
1 files changed, 41 insertions, 0 deletions
diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml
new file mode 100644
index 0000000000..7f64d81624
--- /dev/null
+++ b/.github/workflows/labels.yml
@@ -0,0 +1,41 @@
+# Credit to TechLord22 for writting this for the GTCEu repo
+
+# Manages labels on PRs before allowing merging
+name: Pull Request Labels
+
+on:
+ pull_request:
+ types:
+ - opened
+ - labeled
+ - unlabeled
+ - synchronize
+
+# if a second commit is pushed quickly after the first, cancel the first one's build
+concurrency:
+ group: pr-labels-${{ github.head_ref }}
+ cancel-in-progress: true
+
+jobs:
+ Labels:
+ runs-on: ubuntu-latest
+
+ permissions:
+ pull-requests: read # needed to utilize required-labels
+
+ steps:
+ - name: Check for Merge-Blocking Labels # blocks merge if present
+ uses: mheap/github-action-required-labels@v5
+ with:
+ mode: exactly
+ count: 0
+ labels: 'ongoing freeze - do not merge'
+ exit_type: failure
+
+ - name: Check for Required Labels # require at least one of these labels
+ uses: mheap/github-action-required-labels@v5
+ with:
+ mode: minimum
+ count: 1
+ labels: 'Affects Balance, bug fix, refactor, enhancement, MuTE, new feature, refactor'
+ exit_type: failure