Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check-labels workflow commenting on forked PRs #101467

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/check-labels.yml
@@ -1,8 +1,22 @@
name: Check Labels

on:
# We need pull_request_target to be able to post comments on PRs from forks.
# Only allow pull_request_target when merging to main, not some historical branch.
#
# Make sure to don't introduce explicit checking out and installing/running
# untrusted user code into this workflow!
pull_request_target:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches: [main]
paths-ignore: [.github]

# To allow testing PRs that change workflows.
# May be triggered together with pull_request_target, it's OK.
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
paths: [.github]

workflow_dispatch:

concurrency:
Expand Down