mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-16 06:49:31 +02:00
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:
32
.github/pr-labeler.yml
vendored
32
.github/pr-labeler.yml
vendored
@@ -1,13 +1,19 @@
|
|||||||
'Type: Bug / Error':
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/release-drafter/release-drafter/master/schema.json
|
||||||
- 'bug/*'
|
autolabeler:
|
||||||
- 'fix/*'
|
- label: 'Type: Bug / Error'
|
||||||
'Type: Enhancement':
|
branch:
|
||||||
- 'feature/*'
|
- '/bug\/.+/'
|
||||||
- 'feat/*'
|
- '/fix\/.+/'
|
||||||
'Type: Other':
|
- label: 'Type: Enhancement'
|
||||||
- 'other/*'
|
branch:
|
||||||
- 'chore/*'
|
- '/feature\/.+/'
|
||||||
- 'test/*'
|
- '/feat\/.+/'
|
||||||
- 'refactor/*'
|
- label: 'Type: Other'
|
||||||
'Area: Documentation':
|
branch:
|
||||||
- 'docs/*'
|
- '/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
|
|
8
.github/workflows/pr-labeler.yml
vendored
8
.github/workflows/pr-labeler.yml
vendored
@@ -9,7 +9,7 @@ on:
|
|||||||
# Please read the following first before reviewing/merging:
|
# Please read the following first before reviewing/merging:
|
||||||
# - https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
|
# - 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/
|
# - https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
|
||||||
types: [opened]
|
types: [opened, reopened, synchronize]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -22,6 +22,10 @@ jobs:
|
|||||||
pull-requests: write # write permission is required to label PRs
|
pull-requests: write # write permission is required to label PRs
|
||||||
steps:
|
steps:
|
||||||
- name: Label PR
|
- 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:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
2
.github/workflows/release-draft.yml
vendored
2
.github/workflows/release-draft.yml
vendored
@@ -17,5 +17,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Draft Release
|
- name: Draft Release
|
||||||
uses: release-drafter/release-drafter@v5
|
uses: release-drafter/release-drafter@v5
|
||||||
|
with:
|
||||||
|
disable-autolabeler: true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
Reference in New Issue
Block a user