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
10 changes: 6 additions & 4 deletions .github/workflows/discord-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
issues:
# No `assigned` on purpose: taking an issue is not announced on Discord.
types: [closed, unlabeled, edited]
# pull_request_target (not pull_request) so notifications also work for PRs opened
# from forks, which are not given access to secrets. Safe here because the job only
# ever runs code from the base branch — it never checks out the PR's own code.
pull_request_target:
# pull_request, not pull_request_target: GitHub now blocks pull_request_target on
# public repositories by default. PRs from forks get no secrets with pull_request,
# so the job below skips them.
pull_request:
# ready_for_review pairs with opened: drafts are skipped when they appear and
# announced when the author says they are ready, so neither is missed or early.
types: [opened, ready_for_review, review_requested, closed]
Expand All @@ -25,6 +25,8 @@ permissions:

jobs:
notify:
# Skip PRs and reviews from forks: their runs get no secrets, so the bot would fail.
if: github.event_name == 'issues' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
Expand Down
Loading