]> git.puffer.fish Git - matthieu/frr.git/commitdiff
github: Add base branch label to every PR to distinguish easily
authorDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 8 Jun 2022 08:34:25 +0000 (11:34 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 8 Jun 2022 08:36:03 +0000 (11:36 +0300)
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
.github/workflows/base-branch-label.yml [new file with mode: 0644]

diff --git a/.github/workflows/base-branch-label.yml b/.github/workflows/base-branch-label.yml
new file mode 100644 (file)
index 0000000..01da280
--- /dev/null
@@ -0,0 +1,19 @@
+name: Add base branch label
+
+on:
+  pull_request_target:
+    types:
+      - opened
+      - reopened
+
+jobs:
+  label:
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      pull-requests: write
+    steps:
+      - uses: actions-ecosystem/action-add-labels@v1
+        with:
+          labels: |
+            ${{ github.event.pull_request.base.ref }}