Skip to content

fix(release-announcements): include role mention in Discord release announcement#1310

Merged
muddlebee merged 1 commit intoTracer-Cloud:mainfrom
Devesh36:release
May 5, 2026
Merged

fix(release-announcements): include role mention in Discord release announcement#1310
muddlebee merged 1 commit intoTracer-Cloud:mainfrom
Devesh36:release

Conversation

@Devesh36
Copy link
Copy Markdown
Collaborator

@Devesh36 Devesh36 commented May 5, 2026

This pull request updates the release announcement workflow to optionally mention a Discord role when sending release notifications. The workflow now supports including a role mention in the announcement message if a role ID is provided.

Discord role mention support:

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 5, 2026

Greptile Summary

  • Adds an optional DISCORD_RELEASES_ROLE_ID secret that, when set, prepends a Discord role mention (<@&ROLE_ID>) on its own line before the release announcement message.
  • The implementation correctly uses ${DISCORD_RELEASES_ROLE_ID:-} to stay compatible with set -euo pipefail when the secret is absent, and delegates JSON-safe encoding to jq --arg mention.
  • No changes to the Twitter/X announcement path; all additions are scoped to the announce-discord job.

Confidence Score: 5/5

Safe to merge — change is minimal, well-guarded, and handles the absent-secret case correctly.

No logic errors, security concerns, or breaking changes found. The role mention is optional, properly guarded with a -n check and ${VAR:-} expansion, and the newline-terminated mention is safely encoded through jq's --arg flag.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/release-announcements.yml Adds optional Discord role mention via DISCORD_RELEASES_ROLE_ID secret; correctly guards with -n check and prepends formatted mention to message content using jq --arg

Sequence Diagram

sequenceDiagram
    participant GH as GitHub (release published)
    participant WF as release-announcements.yml
    participant DC as Discord Webhook

    GH->>WF: Trigger on release published
    WF->>WF: Check DISCORD_WEBHOOK_URL set?
    alt webhook not set
        WF-->>WF: Skip (exit 0)
    else webhook set
        WF->>WF: Check DISCORD_RELEASES_ROLE_ID set?
        alt role ID set
            WF->>WF: role_mention = "<@&ROLE_ID>\n"
        else not set
            WF->>WF: role_mention = ""
        end
        WF->>WF: Build payload via jq (mention + message body)
        WF->>DC: POST JSON payload
        DC-->>WF: 2xx OK
    end
Loading

Reviews (1): Last reviewed commit: "fix(release-announcements): include role..." | Re-trigger Greptile

@muddlebee muddlebee merged commit 8625533 into Tracer-Cloud:main May 5, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

😤 @Devesh36 said "I will fix this" and then actually fixed it. Legendary behavior.


👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome.

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