ci(pr-labeler): replace TimonVS/pr-labeler-action
Replace the `TimonVS/pr-labeler-action` with
`release-drafter/release-drafter` as it has an [`autolabeler`][1]
option that can autolabel PRs for us.
This should fix labeling PRs from forks,
see https://github.com/TimonVS/pr-labeler-action/issues/25.
I've kept the `.github/pr-labeler.yml` configuration file, so that
links to it from the https://mermaid.js.org website continue to work.
I've also kept everything in the same
`.github/workflows/pr-labeler.yml` GitHub Actions workflow to make the
`git diff` easier to review, and to keep the GitHub Actions permissions
the same.
[1]: ff929b5ceb/README.md (autolabeler)
This commit is contained in:
parent
672a289909
commit
a1673d3aca
|
@ -1,13 +1,19 @@
|
|||
'Type: Bug / Error':
|
||||
- 'bug/*'
|
||||
- 'fix/*'
|
||||
'Type: Enhancement':
|
||||
- 'feature/*'
|
||||
- 'feat/*'
|
||||
'Type: Other':
|
||||
- 'other/*'
|
||||
- 'chore/*'
|
||||
- 'test/*'
|
||||
- 'refactor/*'
|
||||
'Area: Documentation':
|
||||
- 'docs/*'
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/release-drafter/release-drafter/master/schema.json
|
||||
autolabeler:
|
||||
- label: 'Type: Bug / Error'
|
||||
branch:
|
||||
- '/bug\/.+/'
|
||||
- '/fix\/.+/'
|
||||
- label: 'Type: Enhancement'
|
||||
branch:
|
||||
- '/feature\/.+/'
|
||||
- '/feat\/.+/'
|
||||
- label: 'Type: Other'
|
||||
branch:
|
||||
- '/other\/.+/'
|
||||
- '/chore\/.+/'
|
||||
- '/test\/.+/'
|
||||
- '/refactor\/.+/'
|
||||
- label: 'Area: Documentation'
|
||||
branch:
|
||||
- '/docs\/.+/'
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
name: Validate PR Labeler Configuration
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- .github/workflows/pr-labeler-config-validator.yml
|
||||
- .github/workflows/pr-labeler.yml
|
||||
- .github/pr-labeler.yml
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/pr-labeler-config-validator.yml
|
||||
- .github/workflows/pr-labeler.yml
|
||||
- .github/pr-labeler.yml
|
||||
|
||||
jobs:
|
||||
pr-labeler:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Validate Configuration
|
||||
uses: Yash-Singh1/pr-labeler-config-validator@releases/v0.0.3
|
||||
with:
|
||||
configuration-path: .github/pr-labeler.yml
|
|
@ -9,7 +9,7 @@ on:
|
|||
# Please read the following first before reviewing/merging:
|
||||
# - https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
|
||||
# - https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
|
||||
types: [opened]
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -22,6 +22,10 @@ jobs:
|
|||
pull-requests: write # write permission is required to label PRs
|
||||
steps:
|
||||
- name: Label PR
|
||||
uses: TimonVS/pr-labeler-action@v4
|
||||
uses: release-drafter/release-drafter@v5
|
||||
with:
|
||||
config-name: pr-labeler.yml
|
||||
disable-autolabeler: false
|
||||
disable-releaser: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
@ -17,5 +17,7 @@ jobs:
|
|||
steps:
|
||||
- name: Draft Release
|
||||
uses: release-drafter/release-drafter@v5
|
||||
with:
|
||||
disable-autolabeler: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
Loading…
Reference in New Issue