Skip to content

feat: Allow excluding the Github Actor from the message#112

Open
ondrosh wants to merge 1 commit intortCamp:masterfrom
ondrosh:feature/allow-empty-msg-author
Open

feat: Allow excluding the Github Actor from the message#112
ondrosh wants to merge 1 commit intortCamp:masterfrom
ondrosh:feature/allow-empty-msg-author

Conversation

@ondrosh
Copy link
Copy Markdown

@ondrosh ondrosh commented Oct 13, 2021

Issue

There is currently no way to exclude the Github Actor from being in the message.

Solution

According to the Slack API documentation, the author_link and author_icon values only work if author_name is present.

With omitempty specified on the author_name within the Attachment structure, allowing SLACK_MSG_AUTHOR to be an empty string will result in this field being unset which will allow users to choose if they want to exclude the Github Actor from being in the message.

Changes

  • Update main.sh to use = instead of :- on setting the GITHUB_ACTOR which avoids empty strings being substituted
  • Update README.md with details on how to avoid including the Github Actor in the message

@shvixxl
Copy link
Copy Markdown

shvixxl commented Nov 10, 2021

Actually, I have successfully excluded it from the message by using ' ' as a value for SLACK_MSG_AUTHOR

@alexanderkranga
Copy link
Copy Markdown

Thanks @lazy-octopus-kebab , this works as a workaround:

env:
  SLACK_MSG_AUTHOR: ' '

But merging this PR would definitely help us too!

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.

3 participants