Conversation
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
There was a problem hiding this comment.
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 theMSG_MINIMAL=truemessage field construction path. - Updates README guidance for
MSG_MINIMALto clarify thatSLACK_TITLEis 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.
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
|
@iamimmanuelraj This looks good, ready to merge? |
Yes, ready to merge. Will be merged soon |
|
@iamimmanuelraj I feel like a ungrateful prick but please merge 🙏 we badly need this. |
|
Merging this will be useful, suddenly our title messages dissapeared and the documentation on MSG_MINIMAL is not longer correct on the README. |
Summary
Fixes #250 —
SLACK_TITLEstopped appearing in Slack messages after upgrading from v2.3.3 to v2.4.0, and there was no way to control title visibility viaMSG_MINIMAL.Root cause: Commit
882c24eremovedTitle: getEnv(EnvSlackTitle)from theMSG_MINIMAL=truecode path without updating the documentation, causing a silent breaking change.Changes
Bug fix
main.go: RestoredTitle: getEnv(EnvSlackTitle)in theMSG_MINIMAL=truebranch, matching pre-v2.4.0 and documented behaviour.New feature — title on/off control in comma-separated mode
main.go: WhenMSG_MINIMALis a comma-separated list,SLACK_TITLEis now shown only iftitleis explicitly included in the list. This gives users full control over whether the title appears.strings.TrimSpaceon each token so values likeref, event(with spaces after commas) are matched correctly.Documentation
README.md: UpdatedMSG_MINIMALrow to document all supported values (ref,event,actions url,commit,title) and the new title on/off behaviour with examples.Behaviour summary
MSG_MINIMALvaluetrueref,eventref,event,titletitleTest plan
MSG_MINIMAL: true— confirmSLACK_TITLEappears.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.MSG_MINIMAL— confirm all fields appear as before.