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

Set Slack parameter AsUser to true #907

Merged
merged 1 commit into from
Jan 23, 2020

Conversation

tmcevoy14
Copy link
Contributor

Set as_user to true for slack post message function so messages to a Slack channel use the bot's name and icon.

@tmcevoy14 tmcevoy14 requested a review from lkysow January 22, 2020 16:52
@lkysow
Copy link
Member

lkysow commented Jan 22, 2020

Thanks for the PR. Can you show me a screenshot so I can understand the difference between the old and new way.

@tmcevoy14
Copy link
Contributor Author

Sure @lkysow. Without this flag set, the bot's configurations in Slack do not appear in the message sent from Atlantis'.

Screenshot 2020-01-22 at 17 01 16

Seting the as_user flag to true ensures that the name and profile picture are used for postMessages. So instead of "Bot" the message would appear as a specific bot that I created, e.g. "AtlantisBot".

@lkysow
Copy link
Member

lkysow commented Jan 22, 2020

Do you have a screenshot for what it looks like on?

@tmcevoy14
Copy link
Contributor Author

Yep, this is a screenshot after compiling it locally and testing:
Screenshot 2020-01-23 at 12 02 44

@codecov
Copy link

codecov bot commented Jan 23, 2020

Codecov Report

Merging #907 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #907      +/-   ##
==========================================
+ Coverage   71.73%   71.74%   +<.01%     
==========================================
  Files          65       65              
  Lines        5283     5284       +1     
==========================================
+ Hits         3790     3791       +1     
  Misses       1199     1199              
  Partials      294      294
Impacted Files Coverage Δ
server/events/webhooks/slack_client.go 96.36% <100%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0a4bdc...82bc26d. Read the comment docs.

@lkysow lkysow merged commit d2b02d5 into runatlantis:master Jan 23, 2020
@lkysow
Copy link
Member

lkysow commented Jan 23, 2020

🎉 nice work! This will be in the next release.

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.

2 participants