From: Quinn Casey Date: Thu, 11 Aug 2022 00:19:13 +0000 (-0700) Subject: CI: Add autolabeler X-Git-Tag: v1.9.0-beta.rc1~1^2~11^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1396%2Fhead;p=thirdparty%2Fpaperless-ngx.git CI: Add autolabeler --- diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 16538820d0..a1b6535543 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,3 +1,14 @@ +autolabeler: + - label: "bug" + branch: + - '/^fix/' + title: + - "/^fix/i" + - label: "enhancement" + branch: + - '/^feature/' + title: + - "/^feature/i" categories: - title: 'Breaking Changes' labels: diff --git a/.github/workflows/project-actions.yml b/.github/workflows/project-actions.yml index adfbc6d40d..e8595edf1e 100644 --- a/.github/workflows/project-actions.yml +++ b/.github/workflows/project-actions.yml @@ -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 }}