Skip to content

ci: workflow results → Discord - #1

Merged
edgar-durand merged 1 commit into
mainfrom
ci/discord-workflow-results
Aug 20, 2026
Merged

edgar-durand merged 1 commit into
mainfrom
ci/discord-workflow-results

Conversation

@edgar-durand

Copy link
Copy Markdown
Collaborator

workflow_run catch-all posting CI + Release results to #ci_notifications (same pattern as the clients/backend repos). PR runs post only on failure. DISCORD_RELEASE_WEBHOOK secret set.

🤖 Generated with Claude Code

@edgar-durand
edgar-durand merged commit 96bd58b into main Aug 20, 2026
3 checks passed
@edgar-durand
edgar-durand deleted the ci/discord-workflow-results branch August 20, 2026 12:22

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0dcec31f1e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

echo "::warning::DISCORD_RELEASE_WEBHOOK not set — result not posted."
exit 0
fi
jq -n --arg c "$MSG" '{content:$c, flags:4}' \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Disable mentions in webhook payloads

When a failed run comes from a pull request, MSG includes the contributor-controlled display_title; because this payload omits allowed_mentions, a title containing @everyone, @here, or a Discord mention can trigger notifications in the channel. The existing flags:4 only suppresses embeds, so set allowed_mentions to an empty parse list before forwarding untrusted run metadata.

Useful? React with 👍 / 👎.

exit 0
fi
jq -n --arg c "$MSG" '{content:$c, flags:4}' \
| curl -sS -o /dev/null -w 'discord %{http_code}\n' -X POST -H 'Content-Type: application/json' -d @- "$WEBHOOK"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject failed Discord responses

When the webhook is expired, misconfigured, rate-limited, or rejects the payload, Discord can return an HTTP 4xx/5xx response while this curl invocation still exits successfully, so the reporter remains green even though the notification was lost. curl --help all defines --fail as “Fail fast with no output on HTTP errors”; add HTTP-status validation and, for transient failures such as 429, retry handling.

Useful? React with 👍 / 👎.

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