Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/label-prs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
name: Label PRs

on:
pull_request:
# pull_request_target, not pull_request: for a pull request from a fork,
# pull_request gets a read-only token whatever the permissions block says,
# and adding the labels fails with "Resource not accessible by integration".
# This runs the workflow from the base branch with a writable token. That is
# safe only because no step checks out or runs the pull request's code: the
# labeler reads the changed file names through the API and the script below
# reads only the title. Keep it that way.
pull_request_target:
types: [opened, synchronize, reopened]

permissions:
Expand Down