]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
CI: Add autolabeler 1396/head
authorQuinn Casey <quinn@quinncasey.com>
Thu, 11 Aug 2022 00:19:13 +0000 (17:19 -0700)
committerQuinn Casey <quinn@quinncasey.com>
Thu, 11 Aug 2022 00:19:13 +0000 (17:19 -0700)
.github/release-drafter.yml
.github/workflows/project-actions.yml

index 16538820d0e6cdc1781087ebea7dc008bb6e1834..a1b6535543996c677025f05f343b9a0194d32186 100644 (file)
@@ -1,3 +1,14 @@
+autolabeler:
+  - label: "bug"
+    branch:
+      - '/^fix/'
+    title:
+      - "/^fix/i"
+  - label: "enhancement"
+    branch:
+      - '/^feature/'
+    title:
+      - "/^feature/i"
 categories:
   - title: 'Breaking Changes'
     labels:
index adfbc6d40ded22b3a4eb1df887752cbeeb13d659..e8595edf1e01598278dec72aace7ead54306dcdd 100644 (file)
@@ -13,6 +13,9 @@ on:
       - main
       - dev
 
+permissions:
+  contents: read
+
 env:
   todo: Todo
   done: Done
@@ -35,6 +38,9 @@ jobs:
   pr_opened_or_reopened:
     name: pr_opened_or_reopened
     runs-on: ubuntu-latest
+    permissions:
+      # write permission is required for autolabeler
+      pull-requests: write
     if: github.event_name == 'pull_request_target' && (github.event.action == 'opened' || github.event.action == 'reopened')
     steps:
       - name: Set PR status to ${{ env.in_progress }}
@@ -45,3 +51,7 @@ jobs:
           project_id: 2
           resource_node_id: ${{ github.event.pull_request.node_id }}
           status_value: ${{ env.in_progress }} # Target status
+      - name: Label PR with release-drafter
+        uses: release-drafter/release-drafter@v5
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}