Skip to content

feat: add release announcements workflow for Discord and X (Twitter)#1235

Merged
rrajan94 merged 2 commits intoTracer-Cloud:mainfrom
Devesh36:x
May 3, 2026
Merged

feat: add release announcements workflow for Discord and X (Twitter)#1235
rrajan94 merged 2 commits intoTracer-Cloud:mainfrom
Devesh36:x

Conversation

@Devesh36
Copy link
Copy Markdown
Collaborator

@Devesh36 Devesh36 commented May 3, 2026

What this PR does

Adds a new GitHub Actions workflow to announce published releases on Discord, with optional X (Twitter) posting support.

Why

We want automatic release communication in community channels whenever a GitHub Release is published, while safely skipping X when Twitter credentials are not configured.

Changes

  • Added .github/workflows/release-announcements.yml
    • Triggers on release with types: [published]
    • announce-discord job posts release details to Discord webhook
    • announce-x job composes a tweet and posts via Eomm/why-don-t-you-tweet@v1 when secrets are present
  • Updated .gitignore
    • Added .secrets to prevent local secret file from being committed

Discord Message Includes

  • Release tag
  • Release notes/body
  • Release URL
  • Repo stats (stars, forks)

X/Twitter Behavior

  • Reads Major feature: from release notes for tweet content
  • Keeps tweet under 280 characters with truncation fallback
  • Skips posting if Twitter secrets are missing

Required Secrets

  • DISCORD_WEBHOOK_URL_UPDATE
  • TWITTER_CONSUMER_API_KEY (optional for now)
  • TWITTER_CONSUMER_API_SECRET (optional for now)
  • TWITTER_ACCESS_TOKEN (optional for now)
  • TWITTER_ACCESS_TOKEN_SECRET (optional for now)

Validation Done

  • Local Discord webhook smoke test passed (HTTP 204)
  • Local formatted Discord message test passed (HTTP 204)
  • Verified workflow handles missing Twitter secrets by skipping X post

Notes

  • Current rollout is Discord-first.
  • X integration remains optional and can be enabled later by adding Twitter secrets.
Screenshot 2026-05-03 at 2 17 58 PM

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 3, 2026

Greptile Summary

This PR adds a GitHub Actions workflow that posts release announcements to Discord and optionally to X (Twitter) whenever a GitHub Release is published, and adds .secrets to .gitignore. All five issues flagged in the previous review round (Discord 2000-char limit, mutable action tag, missing --max-time, missing private-repo guard on Discord job, and bare echo for multiline output) have been addressed in this revision.

Confidence Score: 5/5

Safe to merge — all previous review findings are resolved and no new blocking issues found.

All five previously flagged issues (Discord content length, mutable action tag, missing curl timeout, missing private-repo guard on Discord job, unsafe multiline output) are addressed. The Discord payload is safely built with jq, the Twitter action is pinned to a commit SHA, and secret-absence handling is correct. No P0 or P1 issues remain.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/release-announcements.yml New workflow announcing releases on Discord (with jq-built payload, 1700-char truncation, --max-time 30) and optionally on X (Twitter) via action pinned to a commit SHA; previous review findings all resolved.
.gitignore Adds .secrets entry to prevent a local secrets file from being committed; straightforward and correct.

Sequence Diagram

sequenceDiagram
    participant GH as GitHub (release published)
    participant WF as Actions Workflow
    participant DS as Discord Webhook
    participant TW as X / Twitter API

    GH->>WF: release.published event

    par announce-discord job
        WF->>WF: Check DISCORD_WEBHOOK_URL set?
        WF->>WF: Truncate notes to 1700 chars
        WF->>WF: jq-build JSON payload
        WF->>DS: POST /webhooks/... (curl --max-time 30)
        DS-->>WF: HTTP 204 OK
    and announce-x job
        WF->>WF: Check all 4 Twitter secrets present?
        alt secrets missing
            WF->>WF: should_tweet=false → skip
        else secrets present
            WF->>WF: Extract Major feature from release notes
            WF->>WF: Compose ≤280-char tweet (with fallback)
            WF->>WF: Write message to GITHUB_OUTPUT (heredoc)
            WF->>TW: Eomm/why-don-t-you-tweet (pinned SHA)
            TW-->>WF: Tweet posted
        end
    end
Loading

Reviews (2): Last reviewed commit: "fix: enhance release announcement condit..." | Re-trigger Greptile

Comment thread .github/workflows/release-announcements.yml
Comment thread .github/workflows/release-announcements.yml Outdated
Comment thread .github/workflows/release-announcements.yml Outdated
Comment thread .github/workflows/release-announcements.yml Outdated
Comment thread .github/workflows/release-announcements.yml Outdated
@Devesh36 Devesh36 marked this pull request as draft May 3, 2026 10:27
@Devesh36 Devesh36 marked this pull request as ready for review May 3, 2026 10:39
@Devesh36
Copy link
Copy Markdown
Collaborator Author

Devesh36 commented May 3, 2026

@greptile-apps review

@rrajan94
Copy link
Copy Markdown
Collaborator

rrajan94 commented May 3, 2026

LGTM 👍

@rrajan94 rrajan94 merged commit 698da60 into Tracer-Cloud:main May 3, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2026

🏄 Some PRs rot in review for six weeks. @Devesh36's said "not today" and merged like it owned the place. 🌊


👋 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