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
Merged

Conversation

@luke-orden
Copy link
Contributor

@luke-orden luke-orden 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

@rallytime rallytime requested a review from Aug 3, 2018
Copy link
Contributor

@cachedout cachedout left a comment

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

Copy link
Contributor

@gtmanfred gtmanfred 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,
Copy link
Contributor

@gtmanfred gtmanfred Aug 3, 2018

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
Copy link
Contributor

@rallytime rallytime Aug 3, 2018

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

Copy link
Member

@garethgreenaway garethgreenaway left a comment

Awesome! 😁

@rallytime
Copy link
Contributor

@rallytime rallytime 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 add_google_chat branch 2 times, most recently from 873e105 to fe615d8 Aug 3, 2018
@luke-orden
Copy link
Contributor Author

@luke-orden luke-orden commented Aug 3, 2018

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

@rallytime
Copy link
Contributor

@rallytime rallytime 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 add_google_chat branch 4 times, most recently from 9904e4c to ae0b5a3 Aug 6, 2018
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
Copy link
Contributor Author

@luke-orden luke-orden commented Aug 6, 2018

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

Copy link
Contributor

@gtmanfred gtmanfred 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
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[bot]
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants