Skip to content

GHA-149 Add Notify Slack on Failure action to send notifications for failed jobs - #64

Merged
nils-werner-sonarsource merged 4 commits into
masterfrom
nw/add-notify-slack-action
Dec 1, 2025
Merged

nils-werner-sonarsource merged 4 commits into
masterfrom
nw/add-notify-slack-action

Conversation

@nils-werner-sonarsource

@nils-werner-sonarsource nils-werner-sonarsource commented Nov 28, 2025 •

Copy link
Copy Markdown
Contributor

This pull request introduces a new reusable GitHub Action, Notify Slack on Failure, designed to send concise Slack notifications when workflow jobs fail. The addition streamlines alerting for CI failures and integrates with existing Vault and Slack notification actions. The main changes are the addition of documentation and implementation files for this new action, as well as updating the central README to include it.

New Slack Notification Action

  • Added a new composite GitHub Action notify-slack that sends a Slack message when jobs fail, using Vault for secrets and a minimal message format for quick triage. (notify-slack/action.yml)
  • Created comprehensive documentation for the new action, including usage, inputs, prerequisites, and implementation details. (notify-slack/README.md)

Documentation Updates

  • Updated the central README.md to include the new Notify Slack on Failure action in the list of available reusable actions. (README.md)

Demo: https://sonarsource.slack.com/archives/C0455GD6K8Q/p1764345028655559

Screenshot 2025-11-28 at 16 52 43

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod Bot changed the title Add Notify Slack on Failure action to send notifications for failed jobs GHA-149 Add Notify Slack on Failure action to send notifications for failed jobs Nov 28, 2025
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Nov 28, 2025 •

Copy link
Copy Markdown

GHA-149

Comment thread notify-slack/action.yml Fixed
Comment thread notify-slack/action.yml Resolved
Co-authored-by: Jonas Wielage <jonas.wielage@sonarsource.com>
@sonarqubecloud

Copy link
Copy Markdown

SonarQube reviewer guide

Summary: Adds new GitHub Action to send Slack notifications when workflow jobs fail.

Review Focus: The shell script parsing logic in Collect Failed Jobs step uses awk to extract failed jobs from a non-strict JSON format, which may be fragile. Verify it handles edge cases correctly (empty jobs, malformed input, special characters in job names).

Start review at: notify-slack/action.yml. This composite action contains the core logic including the awk parsing script and orchestrates the Vault token retrieval and Slack notification flow.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

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.

LGTM

@nils-werner-sonarsource
nils-werner-sonarsource merged commit 9d383d1 into master Dec 1, 2025
3 checks passed
@nils-werner-sonarsource
nils-werner-sonarsource deleted the nw/add-notify-slack-action branch December 1, 2025 08:04
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.

4 participants