Use release-drafter/release-drafter
GitHub Action to label our PRs
#1833
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Apply labels to PR | |
on: | |
pull_request_target: | |
# required for pr-labeler to support PRs from forks | |
# ===================== ⛔ ☢️ 🚫 ⚠️ Warning ⚠️ 🚫 ☢️ ⛔ ======================= | |
# Be very careful what you put in this GitHub Action workflow file to avoid | |
# malicious PRs from getting access to the Mermaid-js repo. | |
# | |
# 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, reopened, synchronize] | |
pull_request: | |
# Only needed for testing: the `pull_request_target` action will also run | |
paths: | |
- .github/workflows/pr-labeler.yml | |
- .github/pr-labeler.yml | |
types: [opened, reopened, synchronize] | |
permissions: | |
contents: read | |
jobs: | |
pr-labeler: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # read permission is required to read config file | |
pull-requests: write # write permission is required to label PRs | |
steps: | |
- name: Label PR | |
uses: release-drafter/release-drafter@v5 | |
with: | |
config-name: pr-labeler.yml | |
disable-autolabeler: false | |
disable-releaser: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |