From 0dbb95493d26439270681ec4fcb24c4d07e9dae7 Mon Sep 17 00:00:00 2001 From: Aamir Azad Date: Sat, 29 Jun 2024 09:03:25 +0530 Subject: [PATCH 1/3] fix: bring back convetional commit pr tagger --- .github/workflows/pr-conventional-commit.yml | 2 +- .github/workflows/pr-labeler.yml | 19 ------------------- .github/workflows/release-drafter.yml | 5 +++++ 3 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/pr-labeler.yml diff --git a/.github/workflows/pr-conventional-commit.yml b/.github/workflows/pr-conventional-commit.yml index 5b7ce88..7245b34 100644 --- a/.github/workflows/pr-conventional-commit.yml +++ b/.github/workflows/pr-conventional-commit.yml @@ -12,4 +12,4 @@ jobs: uses: ytanikin/PRConventionalCommits@1.2.0 with: task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]' - add_label: "false" + custom_labels: '{"feat": "feature", "fix": "fix", "docs": "documentation", "test": "test", "ci": "ci", "refactor": "refactor", "perf": "performance", "chore": "chore", "revert": "revert"}' diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml deleted file mode 100644 index 6e0ab32..0000000 --- a/.github/workflows/pr-labeler.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: PR Labeler - -on: - pull_request: - types: [opened, synchronize, reopened, edited] - -permissions: - contents: read - -jobs: - add-conventional-commit-label: - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - # Drafts your next Release notes as Pull Requests are merged - - uses: release-drafter/release-drafter@v6 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 3cb95bd..2c5da27 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -5,6 +5,9 @@ on: # branches to consider in the event; optional, defaults to all branches: - main + # pull_request event is required only for autolabeler + pull_request: + types: [opened, reopened, synchronize] workflow_dispatch: {} permissions: @@ -15,6 +18,8 @@ jobs: permissions: # write permission is required to create a github release contents: write + # write permission is required for autolabeler + pull-requests: write runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged From 5f27e1fc84431ce47d0f9ffd11ffa54c2c207279 Mon Sep 17 00:00:00 2001 From: Aamir Azad Date: Sat, 29 Jun 2024 09:12:00 +0530 Subject: [PATCH 2/3] Just try giving it all the permissions --- .github/workflows/release-drafter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 2c5da27..a9817f2 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -11,7 +11,7 @@ on: workflow_dispatch: {} permissions: - contents: read + contents: write jobs: update_release_draft: From 325612574b57d13201dc52ad9a116613b583f967 Mon Sep 17 00:00:00 2001 From: Aamir Azad Date: Sat, 29 Jun 2024 09:15:09 +0530 Subject: [PATCH 3/3] Nope, that didn't work --- .github/workflows/release-drafter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index a9817f2..2c5da27 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -11,7 +11,7 @@ on: workflow_dispatch: {} permissions: - contents: write + contents: read jobs: update_release_draft: