2019-11-30 23:23:09 +01:00
|
|
|
name: Apply labels to PR
|
|
|
|
on:
|
2021-09-07 08:54:53 +02:00
|
|
|
pull_request_target:
|
2023-09-24 18:10:10 +01:00
|
|
|
# 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/
|
2023-09-24 18:53:08 +01:00
|
|
|
types: [opened, reopened, synchronize]
|
2019-11-30 23:23:09 +01:00
|
|
|
|
2023-09-24 18:04:06 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2019-11-30 23:23:09 +01:00
|
|
|
jobs:
|
|
|
|
pr-labeler:
|
|
|
|
runs-on: ubuntu-latest
|
2023-09-24 18:04:06 +01:00
|
|
|
permissions:
|
|
|
|
contents: read # read permission is required to read config file
|
|
|
|
pull-requests: write # write permission is required to label PRs
|
2019-11-30 23:23:09 +01:00
|
|
|
steps:
|
|
|
|
- name: Label PR
|
2023-09-24 18:53:08 +01:00
|
|
|
uses: release-drafter/release-drafter@v5
|
|
|
|
with:
|
|
|
|
config-name: pr-labeler.yml
|
|
|
|
disable-autolabeler: false
|
|
|
|
disable-releaser: true
|
2019-11-30 23:23:09 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|