Skip to content

Commit

Permalink
Merge pull request #48 from pontusarfwedson/feature-add-linked_name
Browse files Browse the repository at this point in the history
added linked_name option for the post body
  • Loading branch information
drnic authored Mar 21, 2018
2 parents 189be5f + 0e61bb4 commit 0c86986
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ Optional:
- `icon_url`: *Optional.* Override icon by providing URL to the image.
- `icon_emoji`: *Optional.* Override icon by providing emoji code (e.g. `:ghost:`).
- `silent`: *Optional.* Do not print curl output (avoids leaking slack webhook URL)
- `link_names`: *Optional.* true or false (defaults to false). Will let you ping group by having @<group-name> in text if set to true.
- `always_notify`: *Optional.* Attempt to notify even if there are errors or missing text. (Expects true or false, defaults to false)

Explore formatting with Slack's [Message Builder](https://api.slack.com/docs/formatting/builder).
Expand Down
2 changes: 2 additions & 0 deletions out
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ text="$(jq -r '(.params.text // "${TEXT_FILE_CONTENT}")' < "${payload}")"
username="$(jq '(.params.username // null)' < "${payload}")"
icon_url="$(jq '(.params.icon_url // null)' < "${payload}")"
icon_emoji="$(jq '(.params.icon_emoji // null)' < "${payload}")"
link_names="$(jq -r '(.params.link_names // false)' < "${payload}")"

channels="$(jq -r '(.params.channel // null)' < "${payload}")"
channel_file="$(jq -r '(.params.channel_file // null)' < "${payload}")"
Expand Down Expand Up @@ -115,6 +116,7 @@ then
{
"text": ${text_interpolated},
"username": ${username},
"link_names": ${link_names}
"icon_url": ${icon_url},
"icon_emoji": ${icon_emoji},
"channel": ${channel},
Expand Down

0 comments on commit 0c86986

Please sign in to comment.