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

Add new google_chat module #48919

Merged
merged 1 commit into from Aug 6, 2018

Conversation

Projects
None yet
6 participants
@luke-orden
Copy link
Contributor

commented Aug 3, 2018

What does this PR do?

Add a new google_chat module which allows you to send a message to a google chat room.

What issues does this PR fix or reference?

N/A

New Behavior

Send a message to a google chat room

Tests written?

Yes

Commits signed with GPG?

Yes

@luke-orden luke-orden force-pushed the luke-orden:add_google_chat branch from f08a1ed to 51719bc Aug 3, 2018

@rallytime rallytime requested a review from saltstack/team-core Aug 3, 2018

@cachedout
Copy link
Collaborator

left a comment

Excellent! Before we merge this, would you mind adding information about this new feature to the release notes?

@gtmanfred
Copy link
Contributor

left a comment

Just one nitpick change.

Otherwise this looks good.

'''
headers = {'Content-Type': 'application/json'}
data = {'text': message}
result = salt.utils.http.query(url,

This comment has been minimized.

Copy link
@gtmanfred

gtmanfred Aug 3, 2018

Contributor

instead of importing salt.utils.http, please use __utils__['http.query']()

https://developers.google.com/hangouts/chat/how-tos/webhooks
'''
# Import Python Libs
from __future__ import absolute_import

This comment has been minimized.

Copy link
@rallytime

rallytime Aug 3, 2018

Contributor

Can you add print_function and unicode_literals to this __future__ import? We need that for PY2/PY3 compatibility. :)

@luke-orden luke-orden force-pushed the luke-orden:add_google_chat branch from 51719bc to 3636897 Aug 3, 2018

@garethgreenaway
Copy link
Member

left a comment

Awesome! 😁

@rallytime

This comment has been minimized.

Copy link
Contributor

commented Aug 3, 2018

@loverend If you could add this to the Fluorine release notes we can get this in pending tests. :)

Thanks for this addition!

@luke-orden luke-orden force-pushed the luke-orden:add_google_chat branch 2 times, most recently from 873e105 to fe615d8 Aug 3, 2018

@luke-orden

This comment has been minimized.

Copy link
Contributor Author

commented Aug 3, 2018

Added to release notes. There wasn't a new modules section like in previous release notes, so added this.

@rallytime

This comment has been minimized.

Copy link
Contributor

commented Aug 3, 2018

@loverend Some of your new tests are having some trouble here. Can you take a look?

https://jenkinsci.saltstack.com/job/pr-kitchen-ubuntu1604-py2/job/PR-48919/5/

@luke-orden luke-orden force-pushed the luke-orden:add_google_chat branch 4 times, most recently from 9904e4c to ae0b5a3 Aug 6, 2018

Add new google_chat module
To send a message directly to google chat via the api (not via a bot)
you need to configure a webhook and post directly to that webhook url.

@luke-orden luke-orden force-pushed the luke-orden:add_google_chat branch from ae0b5a3 to 969d7d6 Aug 6, 2018

@luke-orden

This comment has been minimized.

Copy link
Contributor Author

commented Aug 6, 2018

All tests now pass. I have addressed all comments. Please let me know if there are any further changes required.

@rallytime rallytime added the Fluorine label Aug 6, 2018

@gtmanfred
Copy link
Contributor

left a comment

Awesome! thanks for this! looks great.

@rallytime rallytime merged commit d97178c into saltstack:develop Aug 6, 2018

4 of 7 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has failed
Details
jenkins/pr/py2-centos-7 running py2-centos-7...
Details
WIP ready for review
Details
codeclimate All good!
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.