aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-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