Skip to content

feat(cicd): Add Slack message on Manual SDK Release#35461

Draft
KevinDavilaDotCMS wants to merge 2 commits intomainfrom
feat/sdk-slack-notification-on-manual-release
Draft

feat(cicd): Add Slack message on Manual SDK Release#35461
KevinDavilaDotCMS wants to merge 2 commits intomainfrom
feat/sdk-slack-notification-on-manual-release

Conversation

@KevinDavilaDotCMS
Copy link
Copy Markdown
Member

Here are examples of the types of messages


Auto-publish — next (PR merge)

▎ 🟠 Attention dotters: SDK libs (Angular, Client, Experiments and React) published!

▎ This automated script is happy to announce that a new SDK libs version tagged as: [ 1.5.1-next.1965 (next) ] is now available on the NPM registry 📦!
▎ Introduced by: #35412


Manual release — patch

▎ 🟢 Attention dotters: SDK libs (Angular, Client, Experiments and React) officially released!

▎ This automated script is happy to announce that a new SDK libs version tagged as: [ 1.5.2 (latest) and 1.5.2-next.1966 (next) ] is now available on the NPM registry 📦!
▎ Release type: patch | Triggered by: kevindavila
View workflow run


Manual release — minor

▎ 🟢 Attention dotters: SDK libs (Angular, Client, Experiments and React) officially released!

▎ This automated script is happy to announce that a new SDK libs version tagged as: [ 1.6.0 (latest) and 1.6.0-next.1970 (next) ] is now available on the NPM registry 📦!
▎ Release type: minor | Triggered by: kevindavila
View workflow run


Manual release — major

▎ 🟢 Attention dotters: SDK libs (Angular, Client, Experiments and React) officially released!

▎ This automated script is happy to announce that a new SDK libs version tagged as: [ 2.0.0 (latest) and 2.0.0-next.1975 (next) ] is now available on the NPM registry 📦!
▎ Release type: major | Triggered by: kevindavila
View workflow run


Manual release — custom

▎ 🟢 Attention dotters: SDK libs (Angular, Client, Experiments and React) officially released!

▎ This automated script is happy to announce that a new SDK libs version tagged as: [ 1.5.3 (latest) and 1.5.3-next.1980 (next) ] is now available on the NPM registry 📦!
▎ Release type: custom | Triggered by: kevindavila
View workflow run

… enrich auto-publish message

- Add missing Slack notification step to cicd_manual-release-sdks.yml; the manual
  release workflow called the deploy action directly but never sent a Slack message
- Include release type (patch/minor/major/custom) and triggering actor in the manual
  release notification, with a link to the workflow run
- Add PR extraction step to cicd_comp_deployment-phase.yml that parses the merge
  commit message for a PR number and falls back to the short commit SHA
- Enrich the auto-publish (next) Slack notification with an "Introduced by" link
  pointing to the PR or commit that triggered the SDK publish

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

❌ Issue Linking Required

This PR could not be linked to an issue. All PRs must be linked to an issue for tracking purposes.

How to fix this:

Option 1: Add keyword to PR body (Recommended - auto-removes this comment)
Edit this PR description and add one of these lines:

  • This PR fixes #123 or Fixes: #123

  • This PR closes #123 or Closes: #123

  • This PR resolves #123 or Resolves: #123

  • Other supported keywords: fix, fixed, close, closed, resolve, resolved
    Option 2: Link via GitHub UI (Note: won't clear the failed check)

  1. Go to the PR → Development section (right sidebar)

  2. Click "Link issue" and select an existing issue

  3. Push a new commit or re-run the workflow to clear the failed check
    Option 3: Use branch naming
    Create a new branch with one of these patterns:

  • 123-feature-description (number at start)

  • issue-123-feature-description (issue-number at start)

  • feature-issue-123 (issue-number anywhere)

Why is this required?

Issue linking ensures proper tracking, documentation, and helps maintain project history. It connects your code changes to the problem they solve.---

This comment was automatically generated by the issue linking workflow

@github-actions github-actions Bot added the Area : CI/CD PR changes GitHub Actions/workflows label Apr 26, 2026
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 26, 2026

Claude finished @KevinDavilaDotCMS's task in 2m 9s —— View job


PR Review

  • Gather context
  • Read changed workflow files
  • Analyze and post review

cicd_manual-release-sdks.yml — Critical: missing continue-on-error on Slack step

The Slack notification (step 5) has no continue-on-error: true. GitHub Actions steps default to if: success() when no condition is specified. If the Slack step fails (missing/invalid SLACK_BOT_TOKEN, channel not found, network error), the next step — "Open post-release PR to bump VERSION on main" — will be skipped, leaving the VERSION file stuck on the release version on main. The @next builds would then conflict with @latest until someone manually intervenes.

# cicd_manual-release-sdks.yml — line 123
- name: 'Slack Notification (SDK release announcement)'
  if: success() && steps.deploy-javascript-sdk.outputs.published == 'true'
  # ↑ Missing: continue-on-error: true
  uses: ./.github/actions/core-cicd/notification/notify-slack

Fix: add continue-on-error: true to the Slack step, or add if: always() to the "Open post-release PR" step to make it unconditional. Fix this →


cicd_manual-release-sdks.yml — Notification fires before post-release cleanup

The "officially released" Slack message is sent at step 5, but the post-release PR (VERSION bump on main) is step 6. If PR creation fails, users have already been told the release is done. Low impact (NPM publish has succeeded at that point), but the message implies a fully complete release.


cicd_comp_deployment-phase.ymlhead_commit.message availability in workflow_call

# line 376
env:
  COMMIT_MSG: ${{ github.event.head_commit.message }}

github.event.head_commit is only populated for push events. If this reusable workflow is ever called from a non-push trigger (e.g., workflow_dispatch, pull_request), COMMIT_MSG will be empty. The fallback to the short SHA handles this gracefully (lines 382–385), so not a breaking issue — but worth documenting or asserting.


cicd_comp_deployment-phase.ymlgrep -oP PCRE dependency (low risk)

PR_NUMBER=$(echo "$COMMIT_MSG" | grep -oP '#\K[0-9]+' | head -1)

-P (PCRE) is GNU grep-only. Works on Ubuntu runners but would silently fail on macOS or Alpine. Since this only runs on ubuntu-* runners, it's fine — just a portability note.


What's clean

  • npm-package-version output from deploy-javascript-sdk/action.yml already formats the combined (latest) and … (next) string, so the Slack message content matches the PR description examples exactly.
  • Using env: COMMIT_MSG: to pass the commit message into the shell (rather than inline ${{ }}) avoids shell injection. Good.
  • Condition success() && steps.deploy-javascript-sdk.outputs.published == 'true' is correct and consistent with the existing deployment-phase pattern.

…ations

- Move github.event.head_commit.message to env: block to prevent script
  injection (GitHub security best practice)
- Replace always() with success() on manual release Slack notification step
  for correct conditional semantics
- Add missing newline at end of cicd_comp_deployment-phase.yml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Safe To Rollback Area : CI/CD PR changes GitHub Actions/workflows

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant