Skip to content

Commit

Permalink
Merge pull request #3127 from mirpedrol/template-customisation-micros…
Browse files Browse the repository at this point in the history
…oftteams

Template: add option to exclude adaptivecard and slackreport from pipeline template
  • Loading branch information
mirpedrol authored Aug 21, 2024
2 parents 43de3bc + f7137ca commit 7785b4c
Show file tree
Hide file tree
Showing 5 changed files with 292 additions and 259 deletions.
4 changes: 4 additions & 0 deletions nf_core/pipeline-template/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{%- if email %}
email_template.html
{%- endif %}
{%- if adaptivecard %}
adaptivecard.json
{%- endif %}
{%- if slackreport %}
slackreport.json
{%- endif %}
.nextflow*
work/
data/
Expand Down
4 changes: 2 additions & 2 deletions nf_core/pipeline-template/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ workflow {
{%- endif %}
params.outdir,
params.monochrome_logs,
params.hook_url,
{%- if multiqc %}{{ prefix_nodash|upper }}_{{ short_name|upper }}.out.multiqc_report{% endif %}
{% if adaptivecard or slackreport %}params.hook_url,{% endif %}
{% if multiqc %}{{ prefix_nodash|upper }}_{{ short_name|upper }}.out.multiqc_report{% endif %}
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ include { completionEmail } from '../../nf-core/utils_nfcore_pipeline'
include { completionSummary } from '../../nf-core/utils_nfcore_pipeline'
include { dashedLine } from '../../nf-core/utils_nfcore_pipeline'
include { nfCoreLogo } from '../../nf-core/utils_nfcore_pipeline'
{%- if adaptivecard or slackreport %}
include { imNotification } from '../../nf-core/utils_nfcore_pipeline'
{%- endif %}
include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline'
include { workflowCitation } from '../../nf-core/utils_nfcore_pipeline'

Expand Down Expand Up @@ -126,7 +128,7 @@ workflow PIPELINE_COMPLETION {
{% endif %}
outdir // path: Path to output directory where results will be published
monochrome_logs // boolean: Disable ANSI colour codes in log output
hook_url // string: hook URL for notifications
{% if adaptivecard or slackreport %}hook_url // string: hook URL for notifications{% endif %}
{% if multiqc %}multiqc_report // string: Path to MultiQC report{% endif %}

main:
Expand All @@ -149,9 +151,11 @@ workflow PIPELINE_COMPLETION {

completionSummary(monochrome_logs)

{%- if adaptivecard or slackreport %}
if (hook_url) {
imNotification(summary_params, hook_url)
}
{%- endif %}
}

workflow.onError {
Expand Down
25 changes: 25 additions & 0 deletions nf_core/pipelines/create/templatefeatures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,28 @@ email:
- ".prettierignore"
nfcore_pipelines: False
custom_pipelines: True
adaptivecard:
skippable_paths:
- "assets/adaptivecard.json"
short_description: "Support Microsoft Teams notifications"
description: "Enable pipeline status update messages through Microsoft Teams"
help_text: |
This adds an Adaptive Card. A snippets of user interface.
This Adaptive Card is used as a template for pipeline update messages and it is compatible with Microsoft Teams.
linting:
files_unchanged:
- ".prettierignore"
nfcore_pipelines: False
custom_pipelines: True
slackreport:
skippable_paths:
- "assets/slackreport.json"
short_description: "Support Slack notifications"
description: "Enable pipeline status update messages through Slack"
help_text: |
This adds an JSON template used as a template for pipeline update messages in Slack.
linting:
files_unchanged:
- ".prettierignore"
nfcore_pipelines: False
custom_pipelines: True
512 changes: 256 additions & 256 deletions tests/pipelines/__snapshots__/test_create_app.ambr

Large diffs are not rendered by default.

0 comments on commit 7785b4c

Please sign in to comment.