Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/discord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
types:
- opened
# - synchronize
- reopened
- closed
push:
branches:
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/discord_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ jobs:
ACTION_ICON="<:devpropened:1275356590316322858>"
ACTION_TEXT="has been opened. Please review!"
fi
elif [[ "$EVENT_ACTION" == "reopened" ]]; then
# Draft-aware like `opened` above: a PR can be reopened while it is
# still a draft, and saying "please review" about a draft is the
# thing the split exists to avoid.
if [[ "$PR_DRAFT" == "true" ]]; then
ACTION_ICON="📝"
ACTION_TEXT="draft has been reopened."
else
ACTION_ICON="<:devpropened:1275356590316322858>"
ACTION_TEXT="has been reopened. Please review!"
fi
elif [[ "$EVENT_ACTION" == "ready_for_review" ]]; then
ACTION_ICON="<:devpropened:1275356590316322858>"
ACTION_TEXT="is ready for review!"
Expand All @@ -70,7 +81,11 @@ jobs:
ACTION_ICON="<:devprclosed:1275356586218356776>"
ACTION_TEXT="has been closed!"
else
echo "Unhandled event type. Exiting."
# A warning, not just a log line: this branch is how `reopened`
# stayed broken for a fortnight after consumers started sending it.
# The job still succeeds — a missing message must not fail someone
# else's pipeline — but the run now says which action it dropped.
echo "::warning::discord_pr: no message for event action '$EVENT_ACTION'; nothing sent"
echo "send=false" >> "$GITHUB_OUTPUT"
exit 0
fi
Expand Down