chore: skip linked-issue check for org members

Use github.event.pull_request.author_association to bypass the
linked-issue requirement for MEMBER and COLLABORATOR authors.
External contributors still must reference an issue or discussion.
This commit is contained in:
Kevin Turcios 2026-04-23 05:01:02 -05:00
parent dc5090e2dd
commit b2858dc328

View file

@ -36,6 +36,7 @@ jobs:
env:
PR_BODY: ${{ github.event.pull_request.body }}
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }}
run: |
# Skip for bots (dependabot, renovate, github-actions)
if [[ "$PR_AUTHOR" == *"[bot]"* || "$PR_AUTHOR" == "dependabot" ]]; then
@ -43,6 +44,12 @@ jobs:
exit 0
fi
# Skip for org members and collaborators
if [[ "$AUTHOR_ASSOCIATION" == "MEMBER" || "$AUTHOR_ASSOCIATION" == "COLLABORATOR" ]]; then
echo "Org member/collaborator ($PR_AUTHOR) — skipping linked issue check."
exit 0
fi
if [ -z "$PR_BODY" ]; then
echo "::error::PR body is empty. Every PR must link an issue or discussion."
echo "Use 'Closes #<number>', 'Fixes #<number>', 'Relates to #<number>', or include a discussion URL."