Skip to content

fix(typescript-service-release): notify only on major (breaking) releases#84

Open
Yan Xue (yanxue06) wants to merge 2 commits into
mainfrom
ci/notify-on-major-releases-only
Open

fix(typescript-service-release): notify only on major (breaking) releases#84
Yan Xue (yanxue06) wants to merge 2 commits into
mainfrom
ci/notify-on-major-releases-only

Conversation

@yanxue06

@yanxue06 Yan Xue (yanxue06) commented May 24, 2026

Copy link
Copy Markdown
Member

What

Gate the post-release notify job (the email-monkey release-notification pipeline) so it fires only on major / breaking releases.

Why

The notify job was gating on ["major","minor","patch"] — i.e. it sent a release email on every real release. The intent is to notify only on breaking changes, so minor (feature) and patch releases now skip the job cleanly.

Change

.github/workflows/typescript-service-release.yaml:

- contains(fromJSON('["major","minor","patch"]'), needs.release-info.outputs.release_type)
+ needs.release-info.outputs.release_type == 'major'
  • Also updates the notify-on-release input description to reflect major-only behavior.
  • The allow-list (github.repository == 'photon-hq/spectrum-ts') and notify-on-release opt-out are unchanged.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Chores
    • Release notifications now trigger only for major (breaking) releases.
    • Post-release notification target updated to the campaign trigger endpoint for release emails.

…ases

The notify job fired on every real release (major | minor | patch). Per
intent, release emails should only go out for breaking changes, so gate
the job on release_type == 'major'. Minor/patch releases now skip the
notify job cleanly. Updates the notify-on-release input description to
match.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 24, 2026 04:36
@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1dcae424-3fb0-439e-bd5a-d2e6d4b28305

📥 Commits

Reviewing files that changed from the base of the PR and between 741fe94 and 5914341.

📒 Files selected for processing (1)
  • .github/workflows/typescript-service-release.yaml
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: check-readme / check-readme
  • GitHub Check: check-skills / check-skills
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2026-04-05T00:07:12.194Z
Learnt from: qwerzl
Repo: photon-hq/buildspace PR: 62
File: .github/workflows/update-docs.yaml:164-167
Timestamp: 2026-04-05T00:07:12.194Z
Learning: In this repo (photon-hq/buildspace), reusable workflow blocks referenced under photon-hq/buildspace (e.g., `photon-hq/buildspace/.github/blocks/<block>main`) are intentionally pinned to `main` because the blocks and workflows ship together and are kept in sync. During review, do not flag these references as version-pinning/supply-chain issues just because they use `main`; only require pinning to a release tag if there’s a separate reason (e.g., referencing an external repo or a non-controlled branch).

Applied to files:

  • .github/workflows/typescript-service-release.yaml
📚 Learning: 2026-04-27T01:30:22.893Z
Learnt from: yanxue06
Repo: photon-hq/buildspace PR: 73
File: .github/workflows/check-readme.yaml:18-18
Timestamp: 2026-04-27T01:30:22.893Z
Learning: When reviewing this repo’s GitHub Actions workflows, treat Blacksmith runner labels like `blacksmith-4vcpu-ubuntu-2404` and other `blacksmith-*vcpu-ubuntu-*` values as valid/intentional third-party runner labels (Blacksmith: blacksmith.sh). Do not flag them as unknown or non-standard runner labels—these are an intentional drop-in replacement for GitHub-hosted runners.

Applied to files:

  • .github/workflows/typescript-service-release.yaml
📚 Learning: 2026-04-27T01:30:22.893Z
Learnt from: yanxue06
Repo: photon-hq/buildspace PR: 73
File: .github/workflows/check-readme.yaml:18-18
Timestamp: 2026-04-27T01:30:22.893Z
Learning: In photon-hq/buildspace GitHub workflow YAML files, runner labels that match `blacksmith-*vcpu-ubuntu-*` (e.g., `blacksmith-4vcpu-ubuntu-2404`) are intentionally managed by the Blacksmith CI service (blacksmith.sh) and serve as drop-in replacements for GitHub-hosted ephemeral microVM runners. Do not flag these labels as unknown/non-standard, supply-chain concerns, or “unrecognized runner” issues; any linter/actionlint warnings about these specific labels are expected false positives.

Applied to files:

  • .github/workflows/typescript-service-release.yaml
📚 Learning: 2026-05-21T23:14:29.897Z
Learnt from: yanxue06
Repo: photon-hq/buildspace PR: 76
File: .github/workflows/typescript-service-release.yaml:205-213
Timestamp: 2026-05-21T23:14:29.897Z
Learning: In .github/workflows/typescript-service-release.yaml, do not treat the notify job’s release_type gate that allows {major, minor, patch} (via contains(fromJSON('["major","minor","patch"]'), needs.release-info.outputs.release_type)) as a bug. It is an intentional defensive allowlist to bound unexpected AI classifier output for staging smoke testing, not an accidental restriction. Avoid suggesting removal or tightening to major-only unless the team later decides to change this policy (e.g., after production patch-release noise is no longer an issue).

Applied to files:

  • .github/workflows/typescript-service-release.yaml
🔇 Additional comments (3)
.github/workflows/typescript-service-release.yaml (3)

70-74: LGTM!


225-236: LGTM!


273-273: ⚡ Quick win

Verify the new endpoint exists and accepts the existing payload.

The endpoint changed from /notify-release to /campaigns/spectrum-release/trigger. Confirm that email-monkey exposes this campaign-based route and that the JSON body (repo, version, releaseNotes, releaseType, serviceName) is still accepted.


📝 Walkthrough

Walkthrough

The workflow now documents and enforces notify-only-for-major releases: the notify job condition requires needs.release-info.outputs.release_type == 'major', the inputs.notify-on-release description was updated, and the notify HTTP POST endpoint was changed to /campaigns/spectrum-release/trigger.

Changes

Release Notification Restriction

Layer / File(s) Summary
Restrict notifications to major releases
.github/workflows/typescript-service-release.yaml
inputs.notify-on-release description updated to state notifications run only for major (breaking) releases; jobs.notify.if changed to require needs.release-info.outputs.release_type == 'major'; notify job curl POST URL changed to http://email-monkey/campaigns/spectrum-release/trigger.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

release

Poem

🐰 I hopped through YAML, lines so neat,

telling bells when breaking beats repeat.
Only majors now may wake the song;
the campaign trigger hums along.
A small change, tidy and fleet.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the main change: restricting release notifications to major releases only, which aligns perfectly with all three modifications made to the workflow.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/notify-on-major-releases-only

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

@coderabbitai coderabbitai Bot added the release label May 24, 2026
@github-actions

github-actions Bot commented May 24, 2026

Copy link
Copy Markdown

📚 Skills documentation may need an update

This PR introduces changes that might not be reflected in the skills documentation.

Reason: _skills-repo/skills/buildspace-ci-cd/SKILL.md is missing new caller-facing typescript-service-release.yaml inputs and secrets such as publish-command, use-blacksmith, use-oidc, notify-on-release, APP_ID/APP_PRIVATE_KEY, and TS_OAUTH_CLIENT_ID/TS_OAUTH_SECRET, so it no longer reflects the workflow’s documented interface.

This is an automated check powered by AI. If the skills are intentionally unchanged, feel free to ignore this.

@github-actions

github-actions Bot commented May 24, 2026

Copy link
Copy Markdown

📄 README may need an update

This PR introduces changes that might not be reflected in README.md.

Reason: README.md does not fully document the current caller-facing interface of .github/workflows/typescript-service-release.yaml, including inputs like publish-command, use-blacksmith, and notify-on-release and optional secrets such as APP_ID, APP_PRIVATE_KEY, TS_OAUTH_CLIENT_ID, and TS_OAUTH_SECRET.

This is an automated check powered by AI. If the README is intentionally unchanged, feel free to ignore this.

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants