Skip to content

fix(slack): remove username and icon overrides to use app identity#179

Merged
bedatty merged 3 commits intodevelopfrom
fix/slack-notify-app-identity
Mar 26, 2026
Merged

fix(slack): remove username and icon overrides to use app identity#179
bedatty merged 3 commits intodevelopfrom
fix/slack-notify-app-identity

Conversation

@bedatty
Copy link
Copy Markdown
Contributor

@bedatty bedatty commented Mar 26, 2026

Description

Remove hardcoded SLACK_USERNAME and SLACK_ICON env vars from the Slack notification workflow and composite action. This allows messages to use the name and avatar configured in the Lerian Notifications Slack app instead of showing "GitHub Actions" with the GitHub logo.

Affected files:

  • .github/workflows/slack-notify.yml
  • src/notify/slack-notify/action.yml

Type of Change

  • feat: New workflow or new input/output/step in an existing workflow
  • fix: Bug fix in a workflow (incorrect behavior, broken step, wrong condition)
  • perf: Performance improvement (e.g. caching, parallelism, reduced steps)
  • refactor: Internal restructuring with no behavior change
  • docs: Documentation only (README, docs/, inline comments)
  • ci: Changes to self-CI (workflows under .github/workflows/ that run on this repo)
  • chore: Dependency bumps, config updates, maintenance
  • test: Adding or updating tests
  • BREAKING CHANGE: Callers must update their configuration after this PR

Breaking Changes

None. The Slack app identity is already configured — removing the overrides simply stops masking it.

Testing

  • YAML syntax validated locally
  • Triggered a real workflow run on a caller repository using @develop or the beta tag
  • Verified all existing inputs still work with default values
  • Confirmed no secrets or tokens are printed in logs
  • Checked that unrelated workflows are not affected

Caller repo / workflow run:

Related Issues

Closes #

Summary by CodeRabbit

  • Chores
    • Slack notify integration pinned to a specific action reference and reverted to the action’s default sender name/icon.
  • Bug Fixes
    • Improved how multi-line and status outputs are emitted to prevent truncated or malformed Slack messages.
  • Enhancements
    • Slack messages now include richer run details (author, branch/commit, failed jobs and run link) and respect optional custom message text.

@bedatty bedatty requested a review from a team as a code owner March 26, 2026 21:15
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

Walkthrough

Workflow and composite action now write outputs using quoted "$GITHUB_OUTPUT" and grouped redirections; status and message construction use step-local shell variables and GitHub context values; Slack notify action is pinned to a commit SHA and SLACK_USERNAME/SLACK_ICON env vars were removed. (49 words)

Changes

Cohort / File(s) Summary
Workflow
/.github/workflows/slack-notify.yml
Use step-local SLACK_URL check; replace direct ${{ inputs.status }} with INPUT_STATUS; write skip, color, emoji, status_text, and multi-line message to "$GITHUB_OUTPUT" using grouped redirection blocks; construct RUN_URL, BRANCH, and MESSAGE from env/GitHub context; pin Slack action to a commit SHA; remove SLACK_USERNAME and SLACK_ICON.
Composite action
src/notify/slack-notify/action.yml
Switch >> $GITHUB_OUTPUT to >> "$GITHUB_OUTPUT" and emit multi-line outputs via grouped blocks; emit color/emoji/status_text and message through "$GITHUB_OUTPUT" once; pin Slack action to commit SHA; remove SLACK_USERNAME and SLACK_ICON env vars.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed Title directly matches the primary change: removing SLACK_USERNAME and SLACK_ICON overrides to allow app identity usage.
Description check ✅ Passed Description covers the change objective, affected files, type classification, testing performed, and breaking changes status, aligning with template requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 fix/slack-notify-app-identity

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

@lerian-studio lerian-studio added the size/XS PR changes < 50 lines label Mar 26, 2026
@lerian-studio
Copy link
Copy Markdown

lerian-studio commented Mar 26, 2026

🛡️ CodeQL Analysis Results

Languages analyzed: actions

✅ No security issues found.


🔍 View full scan logs | 🛡️ Security tab

@lerian-studio lerian-studio added the workflow Changes to one or more reusable workflow files label Mar 26, 2026
@lerian-studio
Copy link
Copy Markdown

lerian-studio commented Mar 26, 2026

🔍 Lint Analysis

Check Files Scanned Status
YAML Lint 2 file(s) ✅ success
Action Lint 1 file(s) ✅ success
Pinned Actions 2 file(s) ✅ success
Markdown Link Check no changes ⏭️ skipped
Spelling Check 2 file(s) ✅ success
Shell Check 2 file(s) ✅ success
README Check 2 file(s) ✅ success
Composite Schema 1 file(s) ✅ success

🔍 View full scan logs

@lerian-studio lerian-studio added size/S PR changes 50–199 lines and removed size/XS PR changes < 50 lines labels Mar 26, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/slack-notify.yml (1)

62-62: ⚠️ Potential issue | 🟡 Minor

Fix trailing spaces — pipeline is failing.

Yamllint reports trailing-spaces errors on lines 62, 85, 106, 115, 118, 124, 127, 130, 135, and 138. These are blocking errors.

#!/bin/bash
# Verify trailing spaces in the file
grep -n ' $' .github/workflows/slack-notify.yml | head -20

Also applies to: 85-85, 106-106, 115-115, 118-118, 124-124, 127-127, 130-130, 135-135, 138-138

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/slack-notify.yml at line 62, The YAML file
.github/workflows/slack-notify.yml contains trailing spaces on multiple lines
(reported at lines 62, 85, 106, 115, 118, 124, 127, 130, 135, 138) which breaks
yamllint; open that workflow file and remove any trailing whitespace characters
at the ends of those lines (and run a full trim of trailing spaces across the
file or run `sed -i 's/[ \t]\+$//'` locally) so the file has no trailing spaces
and the pipeline passes validation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/slack-notify.yml:
- Line 147: The inline comment on the GitHub Actions step using "uses:
rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661" needs two
spaces before the "#" to satisfy yamllint; edit the line containing that uses
entry so there are exactly two spaces between the tag and the inline comment
marker (the "# v2" comment).

In `@src/notify/slack-notify/action.yml`:
- Line 124: The YAML line using the action identifier "uses:
rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661" has an
inline comment with insufficient spacing; update that line so there are exactly
two spaces before the inline comment (i.e., ensure "uses:
rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661" is followed
by two spaces, then the "#" and comment text) to satisfy yamllint's "too few
spaces before comment" rule.

---

Outside diff comments:
In @.github/workflows/slack-notify.yml:
- Line 62: The YAML file .github/workflows/slack-notify.yml contains trailing
spaces on multiple lines (reported at lines 62, 85, 106, 115, 118, 124, 127,
130, 135, 138) which breaks yamllint; open that workflow file and remove any
trailing whitespace characters at the ends of those lines (and run a full trim
of trailing spaces across the file or run `sed -i 's/[ \t]\+$//'` locally) so
the file has no trailing spaces and the pipeline passes validation.
🪄 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: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5f169880-a07e-462e-a817-959681a8a46a

📥 Commits

Reviewing files that changed from the base of the PR and between e80106d and ce32361.

📒 Files selected for processing (2)
  • .github/workflows/slack-notify.yml
  • src/notify/slack-notify/action.yml

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
.github/workflows/slack-notify.yml (1)

150-150: ⚠️ Potential issue | 🟡 Minor

yamllint spacing: 2 spaces required before inline comment.

Same issue flagged previously — needs 2 spaces between the SHA and #.

Proposed fix
-        uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2
+        uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661  # v2
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/slack-notify.yml at line 150, The YAML line using the
Slack action has only one space before the inline comment; update the line
containing "uses:
rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2" to
ensure there are exactly two spaces before the "#" (i.e., "...90661  # v2") so
it conforms to yamllint spacing rules; edit that single occurrence in
.github/workflows/slack-notify.yml and save the file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @.github/workflows/slack-notify.yml:
- Line 150: The YAML line using the Slack action has only one space before the
inline comment; update the line containing "uses:
rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2" to
ensure there are exactly two spaces before the "#" (i.e., "...90661  # v2") so
it conforms to yamllint spacing rules; edit that single occurrence in
.github/workflows/slack-notify.yml and save the file.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c0c8a035-6926-4a2f-a40c-e2dce84b74c3

📥 Commits

Reviewing files that changed from the base of the PR and between ce32361 and b65eddd.

📒 Files selected for processing (1)
  • .github/workflows/slack-notify.yml

@bedatty bedatty merged commit cae726c into develop Mar 26, 2026
17 checks passed
@github-actions github-actions bot deleted the fix/slack-notify-app-identity branch March 26, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S PR changes 50–199 lines workflow Changes to one or more reusable workflow files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants