mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-20 20:44:17 +02:00
Guard require-issue-link check job to pull_request_target events (#4209)
This commit is contained in:
parent
b194349983
commit
fd4d24ff62
1 changed files with 9 additions and 3 deletions
12
.github/workflows/require-issue-link.yml
vendored
12
.github/workflows/require-issue-link.yml
vendored
|
|
@ -57,10 +57,16 @@ jobs:
|
|||
# then the script resolves the author's real permission and exits early
|
||||
# for maintainers.
|
||||
#
|
||||
# Gate: skip drafts, bots, and already-bypassed/trusted PRs. Allow the
|
||||
# primary actions plus the one maintainer-override action we care about
|
||||
# (removing the missing-issue-link label).
|
||||
# Gate: only run on pull_request_target events. The workflow also listens
|
||||
# to `issues.assigned` (handled by reopen-on-assignment below), and without
|
||||
# this guard the job would also fire there — `github.event.pull_request` is
|
||||
# null on an issues event, so `...draft == false` coerces to true and the
|
||||
# script then dereferences a missing PR and crashes. Beyond the event type,
|
||||
# skip drafts, bots, and already-bypassed/trusted PRs, and allow the primary
|
||||
# actions plus the one maintainer-override action we care about (removing
|
||||
# the missing-issue-link label).
|
||||
if: >-
|
||||
github.event_name == 'pull_request_target' &&
|
||||
github.event.pull_request.draft == false &&
|
||||
!endsWith(github.actor, '[bot]') &&
|
||||
!contains(github.event.pull_request.labels.*.name, 'trusted-contributor') &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue