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

Extended the hook_url functionality to Slack #1829

Merged
merged 3 commits into from
Nov 16, 2022
Merged

Extended the hook_url functionality to Slack #1829

merged 3 commits into from
Nov 16, 2022

Conversation

muffato
Copy link
Member

@muffato muffato commented Sep 16, 2022

Hello,

Got very interested in what @matthdsm did in #1798 . This is a small extension to support Slack as well, since Slack doesn't understand adaptive cards.

Here is how the notifications look like:

Screenshot 2022-09-16 at 11 16 27

Screenshot 2022-09-16 at 11 38 18

The JSON has a very long and tricky line where I try to improve the look-and-feel of the pipeline configuration:

  • paths are printed as code
  • dates are formatted according to the locale settings
  • the hook_url itself is hidden

Note: I am using the legacy "attachments" method of the Slack API, rather than the now-recommended Block Kit method, because I couldn't find how to make the latter put some colour. I think one has to immediately know whether it failed or not, and the colour is faster to recognise than the text itself.

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Merging #1829 (33a09af) into dev (7010335) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev    #1829   +/-   ##
=======================================
  Coverage   63.74%   63.74%           
=======================================
  Files          41       41           
  Lines        4913     4913           
=======================================
  Hits         3132     3132           
  Misses       1781     1781           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@matthdsm
Copy link
Contributor

Love it, just left one small comment

@muffato
Copy link
Member Author

muffato commented Sep 16, 2022

IM_notification can do. I feel uninspired today and can't find a better name

@muffato muffato added the template nf-core pipeline/component template label Sep 28, 2022
@muffato
Copy link
Member Author

muffato commented Nov 3, 2022

Is this considered to be superseded by https://github.com/Midnighter/nf-slack ?

@muffato muffato merged commit 955e763 into dev Nov 16, 2022
@muffato muffato deleted the slack_report branch November 16, 2022 10:13
@muffato
Copy link
Member Author

muffato commented Nov 16, 2022

Thank you !

@mashehu
Copy link
Contributor

mashehu commented Nov 16, 2022

Please add documentation about this nf-core/website#1455

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
template nf-core pipeline/component template
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants