Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Variable | Default | Purp
------------------|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------
SLACK_CHANNEL | Set during Slack webhook creation | Specify Slack channel in which message needs to be sent
SLACK_USERNAME | `rtBot` | Custom Slack Username sending the message. Does not need to be a "real" username.
SLACK_MSG_AUTHOR | `$GITHUB_ACTOR` (The person who triggered action). | GitHub username of the person who has triggered the action. In case you want to modify it, please specify corrent GitHub username.
SLACK_MSG_AUTHOR | `$GITHUB_ACTOR` (The person who triggered action). | GitHub username of the person who has triggered the action. In case you want to modify it, please specify corrent GitHub username. If set to an empty string, the message will not include the username.
SLACK_ICON | ![rtBot Avatar](https://github.com/rtBot.png?size=32) | User/Bot icon shown with Slack message. It uses the URL supplied to this env variable to display the icon in slack message.
SLACK_ICON_EMOJI | - | User/Bot icon shown with Slack message, in case you do not wish to add a URL for slack icon as above, you can set slack emoji in this env variable. Example value: `:bell:` or any other valid slack emoji.
SLACK_COLOR | `good` (green) | You can pass `${{ job.status }}` for automatic coloring or an RGB value like `#efefef` which would change color on left side vertical line of Slack message.
Expand Down
2 changes: 1 addition & 1 deletion main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export SLACK_USERNAME=${SLACK_USERNAME:-"rtBot"}
export CI_SCRIPT_OPTIONS="ci_script_options"
export SLACK_TITLE=${SLACK_TITLE:-"Message"}
export COMMIT_MESSAGE=$(cat "$GITHUB_EVENT_PATH" | jq -r '.commits[-1].message')
export GITHUB_ACTOR=${SLACK_MSG_AUTHOR:-"$GITHUB_ACTOR"}
export GITHUB_ACTOR=${SLACK_MSG_AUTHOR="$GITHUB_ACTOR"}

hosts_file="$GITHUB_WORKSPACE/.github/hosts.yml"

Expand Down