]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Automatically comment on PRs needing squash
authorFlole998 <Flole998@users.noreply.github.com>
Sat, 3 Feb 2024 20:39:35 +0000 (21:39 +0100)
committerGitHub <noreply@github.com>
Sat, 3 Feb 2024 20:39:35 +0000 (21:39 +0100)
.github/workflows/comment-on-labels.yml [new file with mode: 0644]

diff --git a/.github/workflows/comment-on-labels.yml b/.github/workflows/comment-on-labels.yml
new file mode 100644 (file)
index 0000000..4235a38
--- /dev/null
@@ -0,0 +1,21 @@
+name: Add comment
+on:
+  pull_request:
+    types:
+      - labeled
+jobs:
+  add-comment:
+    if: github.event.label.name == 'SQUASH'
+    runs-on: ubuntu-latest
+    permissions:
+      issues: write
+    steps:
+      - name: Add comment
+        run: gh issue comment "$NUMBER" --body "$BODY"
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          GH_REPO: ${{ github.repository }}
+          NUMBER: ${{ github.event.issue.number }}
+          BODY: >
+            Please squash your commits together in order to get htem merged
+            :sparkles: Thank you for your contribution! :sparkles: