[PIPE2D-664] Add Slack notification to weekly Created: 05/Dec/20 Updated: 12/Sep/22 Resolved: 12/Sep/22 |
|
| Status: | Done |
| Project: | DRP 2-D Pipeline |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Story | Priority: | Normal |
| Reporter: | price | Assignee: | price |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Story Points: | 2 |
| Description |
|
It would be helpful to post on Slack the status of the weekly build and processing run. Apparently, it's as simple as:
def post_message_to_slack(text, blocks=None):
return requests.post('https://slack.com/api/chat.postMessage', {
'token': slack_token,
'channel': slack_channel,
'text': text,
'icon_url': slack_icon_url,
'username': slack_user_name,
'blocks': json.dumps(blocks) if blocks else None
}).json()
|
| Comments |
| Comment by price [ 12/Sep/22 ] |
|
Done under |