aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Gagarin <valentin.gagarin@tweag.io>2023-03-13 17:57:39 +0100
committerGitHub <noreply@github.com>2023-03-13 17:57:39 +0100
commit4a96125c3cbcb91eebb6ebda044841f3fab3bf21 (patch)
treeb38999774deeedcd22cd903b2871b8d97fd2cbcf
parentd37b8a29ce6d93d73213e2f5b44aa28c8948cd1d (diff)
parent966751656645c2c545c78b04b9f8d93465b8f290 (diff)
Merge pull request #6338 from Artturin/labeler
add labeler workflow
-rw-r--r--.github/labeler.yml6
-rw-r--r--.github/workflows/labels.yml24
2 files changed, 30 insertions, 0 deletions
diff --git a/.github/labeler.yml b/.github/labeler.yml
new file mode 100644
index 000000000..dc502b6d5
--- /dev/null
+++ b/.github/labeler.yml
@@ -0,0 +1,6 @@
+"documentation":
+ - doc/manual/*
+ - src/nix/**/*.md
+
+"tests":
+ - tests/**/*
diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml
new file mode 100644
index 000000000..5f949ddc5
--- /dev/null
+++ b/.github/workflows/labels.yml
@@ -0,0 +1,24 @@
+name: "Label PR"
+
+on:
+ pull_request_target:
+ types: [edited, opened, synchronize, reopened]
+
+# WARNING:
+# When extending this action, be aware that $GITHUB_TOKEN allows some write
+# access to the GitHub API. This means that it should not evaluate user input in
+# a way that allows code injection.
+
+permissions:
+ contents: read
+ pull-requests: write
+
+jobs:
+ labels:
+ runs-on: ubuntu-latest
+ if: github.repository_owner == 'NixOS'
+ steps:
+ - uses: actions/labeler@v4
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ sync-labels: true