Skip to content

ci: only announce major and minor releases to Discord - #1393

Merged
DZakh merged 1 commit into
mainfrom
ci/discord-major-releases-only
Jul 9, 2026
Merged

ci: only announce major and minor releases to Discord#1393
DZakh merged 1 commit into
mainfrom
ci/discord-major-releases-only

Conversation

@Jordy-Baby

@Jordy-Baby Jordy-Baby commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Gates the release announcement workflow so it only posts to Discord for major and minor releases (exact X.Y.0).

  • Patch releases and prereleases (alpha/rc) are skipped
  • Note: some hyperindex RC tags (e.g. v3.0.0-rc.1) are not flagged as prereleases on GitHub, so the tag is matched exactly (anchored, no suffix) rather than relying on the prerelease flag
  • Discord embed step and its formatting are unchanged

Validated against all 204 historical releases: 38 would post (down from 204), matching the major + minor set.

Summary by CodeRabbit

  • Chores
    • Release announcements are now sent to Discord only when the published release tag matches an X.Y.0 semver pattern (optionally prefixed with v), and only when there is no prerelease suffix.
    • Pre-release versions (for example, alpha/rc) are excluded from Discord announcements.
    • The announcement step now runs conditionally based on this tag classification.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Discord release workflow now classifies release tags, skips prereleases, and posts to Discord only for tags matching X.Y.0 after removing an optional leading v.

Changes

Discord Release Announcement Gating

Layer / File(s) Summary
Classify and gate Discord posting
.github/workflows/discord-release.yml
Adds a classification step that sets announce=true only for non-prerelease tags matching X.Y.0 after stripping a leading v; the Discord posting step now runs only when that output is true.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the workflow change to announce only major/minor releases on Discord and skip prereleases.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/discord-release.yml:
- Around line 28-29: The semver check in the release workflow is too permissive
and can misclassify non-exact tags as major releases. Update the
version-matching condition in the Discord release workflow so the regex used in
the version classification branch is anchored at the end (or otherwise bounded)
to only accept exact X.Y.Z tags; this applies to the shell conditional that uses
BASH_REMATCH for the major-release path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 749d693c-a935-4a89-9b0b-b8564b9d0e1e

📥 Commits

Reviewing files that changed from the base of the PR and between 5d8eeaa and 2e6fef5.

📒 Files selected for processing (1)
  • .github/workflows/discord-release.yml

Comment thread .github/workflows/discord-release.yml Outdated
@Jordy-Baby
Jordy-Baby force-pushed the ci/discord-major-releases-only branch from 2e6fef5 to adc037e Compare July 8, 2026 13:47

@DZakh DZakh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We want minor releases as well

@Jordy-Baby
Jordy-Baby requested a review from DZakh July 9, 2026 08:09
Gate the Discord announcement so it posts for major and minor releases
(exact X.Y.0, no pre-release suffix). Skips patch releases and release
candidates such as v3.0.0-rc.1 that GitHub does not flag as prereleases.
@Jordy-Baby
Jordy-Baby force-pushed the ci/discord-major-releases-only branch from adc037e to da73473 Compare July 9, 2026 08:18
@Jordy-Baby Jordy-Baby changed the title ci: only announce major releases to Discord ci: only announce major and minor releases to Discord Jul 9, 2026
@Jordy-Baby

Jordy-Baby commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@DZakh Done, updated to announce major and minor releases (X.Y.0). Patches and prereleases are still skipped. Ready for another look.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/discord-release.yml:
- Around line 15-35: The release classification in the Discord workflow
currently treats any X.Y.0 tag as announceable, which conflicts with the
intended major-only behavior. Update the logic in the classify step so it only
sets announce=true for tags matching X.0.0 after stripping an optional leading
v, and keep prereleases excluded; also align the step name and inline comment to
reflect major-only release announcements. Use the existing classify step and
TAG/IS_PRERELEASE handling to locate the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9917d692-b8ab-4565-8e86-c862b2816b95

📥 Commits

Reviewing files that changed from the base of the PR and between adc037e and da73473.

📒 Files selected for processing (1)
  • .github/workflows/discord-release.yml

Comment thread .github/workflows/discord-release.yml

@DZakh DZakh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! I won't need to delete alpha release anymore 😁

@DZakh
DZakh merged commit 23e2ce4 into main Jul 9, 2026
8 checks passed
@DZakh
DZakh deleted the ci/discord-major-releases-only branch July 9, 2026 11:41
DZakh pushed a commit that referenced this pull request Jul 9, 2026
…get-redesign-yl7t1u

Brings in the Discord-release CI workflow tweak (#1393); workflow-only, no
code overlap with this branch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0174BGgup49cCEGmFyBW7Wyx
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