Skip to content

fix/feat: restore SLACK_TITLE in MSG_MINIMAL and add title on/off control - #252

Open
rtBot wants to merge 3 commits into
masterfrom
fix/slack-title-msg-minimal
Open

rtBot wants to merge 3 commits into
masterfrom
fix/slack-title-msg-minimal

Conversation

@rtBot

@rtBot rtBot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #250SLACK_TITLE stopped appearing in Slack messages after upgrading from v2.3.3 to v2.4.0, and there was no way to control title visibility via MSG_MINIMAL.

Root cause: Commit 882c24e removed Title: getEnv(EnvSlackTitle) from the MSG_MINIMAL=true code path without updating the documentation, causing a silent breaking change.

Changes

Bug fix

  • main.go: Restored Title: getEnv(EnvSlackTitle) in the MSG_MINIMAL=true branch, matching pre-v2.4.0 and documented behaviour.

New feature — title on/off control in comma-separated mode

  • main.go: When MSG_MINIMAL is a comma-separated list, SLACK_TITLE is now shown only if title is explicitly included in the list. This gives users full control over whether the title appears.
  • Also adds strings.TrimSpace on each token so values like ref, event (with spaces after commas) are matched correctly.

Documentation

  • README.md: Updated MSG_MINIMAL row to document all supported values (ref, event, actions url, commit, title) and the new title on/off behaviour with examples.

Behaviour summary

MSG_MINIMAL value Fields shown
(not set) Ref + Event + Actions URL + Commit + Title + Message
true Title + Message
ref,event Ref + Event + Message (no title)
ref,event,title Ref + Event + Title + Message
title Title + Message only

Test plan

  • MSG_MINIMAL: true — confirm SLACK_TITLE appears.
  • MSG_MINIMAL: ref,title — confirm ref and title appear, Event/Actions URL/Commit do not.
  • MSG_MINIMAL: event — confirm event appears but title does not.
  • MSG_MINIMAL: title — confirm only title and message appear.
  • No MSG_MINIMAL — confirm all fields appear as before.

Commit 882c24e removed the Title field from the MSG_MINIMAL=true branch,
causing SLACK_TITLE to stop appearing in Slack messages — a regression
from v2.3.3 behaviour. Restore Title: getEnv(EnvSlackTitle) so the title
is always included when MSG_MINIMAL is used.

Also update README to accurately document that MSG_MINIMAL=true keeps
SLACK_TITLE and SLACK_MESSAGE, and that SLACK_TITLE is always included
regardless of the value used.

Fixes #250
Copilot AI review requested due to automatic review settings June 15, 2026 07:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR restores SLACK_TITLE in Slack notifications when MSG_MINIMAL=true, aligning runtime behavior with pre-v2.4.0 releases and the documented expectations in issue #250.

Changes:

  • Re-adds Title: getEnv(EnvSlackTitle) to the MSG_MINIMAL=true message field construction path.
  • Updates README guidance for MSG_MINIMAL to clarify that SLACK_TITLE is included even in minimal mode and that removed fields can be selectively re-enabled via a comma-separated list.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
README.md Updates MSG_MINIMAL documentation to describe what fields are removed/kept.
main.go Restores SLACK_TITLE inclusion in the MSG_MINIMAL=true code path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
rtBot and others added 2 commits June 15, 2026 13:05
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
When MSG_MINIMAL is set to a comma-separated list, SLACK_TITLE is now
shown only when "title" is explicitly included in the list. This lets
users choose whether to include or omit the title independently of other
fields.

  MSG_MINIMAL: true          → keeps SLACK_TITLE + SLACK_MESSAGE (backward compat)
  MSG_MINIMAL: ref,title     → ref + title + message
  MSG_MINIMAL: event         → event + message (no title)
  MSG_MINIMAL: title         → title + message only

Also adds TrimSpace on each comma-separated token so values like
"ref, event" (with spaces) are matched correctly.

Closes #250
@rtBot rtBot changed the title fix: restore SLACK_TITLE when MSG_MINIMAL=true fix/feat: restore SLACK_TITLE in MSG_MINIMAL and add title on/off control Jun 15, 2026
@Dohmanlechx

Copy link
Copy Markdown

@iamimmanuelraj This looks good, ready to merge?

@iamimmanuelraj

Copy link
Copy Markdown
Member

@iamimmanuelraj This looks good, ready to merge?

Yes, ready to merge. Will be merged soon

@Dohmanlechx

Copy link
Copy Markdown

@iamimmanuelraj I feel like a ungrateful prick but please merge 🙏 we badly need this.

@Dohmanlechx

Copy link
Copy Markdown

@iamimmanuelraj?

@vizcay

vizcay commented Sep 14, 2026

Copy link
Copy Markdown

Merging this will be useful, suddenly our title messages dissapeared and the documentation on MSG_MINIMAL is not longer correct on the README.

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.

SLACK_TITLE stopped working after 2.3.3 -> 2.4.0

5 participants