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