Skip to content

fix(ci): use pull_request_target for Slack notifications on fork PRs#53

Merged
sabre1041 merged 1 commit into
redhat-cop:mainfrom
stevefulme1:fix/slack-notification-webhook
Jul 11, 2026
Merged

fix(ci): use pull_request_target for Slack notifications on fork PRs#53
sabre1041 merged 1 commit into
redhat-cop:mainfrom
stevefulme1:fix/slack-notification-webhook

Conversation

@stevefulme1

Copy link
Copy Markdown
Contributor

Summary

  • Switches Slack PR notification workflow from pull_request to pull_request_target trigger
  • Fork PRs (e.g. from stevefulme1) cannot access repository secrets under pull_request, causing SLACK_WEBHOOK_URL to be empty and the action to fail with Missing input! Either a method or webhook is required to take action
  • pull_request_target runs in the base repo context with full secret access — safe here because the workflow only sends notifications and never checks out or executes PR code
  • Bumps slackapi/slack-github-action from v2.1.0 to v2.1.1

Evidence

Test plan

  • Merge this PR and verify the next fork PR event sends a Slack notification
  • Verify redhat-cop-branch PRs still send notifications

Fork PRs cannot access repository secrets under pull_request trigger,
causing the Slack webhook to fail with 'Missing input' error. Switch to
pull_request_target which runs in the base repo context with secret
access. Safe because this workflow only sends notifications and does
not checkout or execute PR code.

Also bumps slack-github-action from v2.1.0 to v2.1.1.
@stevefulme1 stevefulme1 requested a review from sabre1041 as a code owner July 10, 2026 12:57
@stevefulme1 stevefulme1 deployed to external-ci July 10, 2026 12:57 — with GitHub Actions Active

@sabre1041 sabre1041 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sabre1041 sabre1041 merged commit 2cf83c3 into redhat-cop:main Jul 11, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants