From 034a24316ca8de9b84512437bb5987bafc95caec Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 28 Oct 2025 14:38:18 +0100 Subject: [PATCH 1/5] add blobpost to sync --- .github/workflows/sync.yml | 5 +++++ nf_core/pipelines/sync.py | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index f3d6b1187b..7c9dcce478 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -20,6 +20,10 @@ on: description: "Enable debug/verbose mode (true or false)" type: boolean default: false + blog_post: + description: "link to release blogpost" + type: string + default: "" # Cancel if a newer run is started concurrency: @@ -114,6 +118,7 @@ jobs: --pull-request \ --username nf-core-bot \ --github-repository nf-core/${{ matrix.pipeline }} + --blogpost ${{inputs.blogpost}} - name: Upload sync log file artifact if: ${{ always() }} diff --git a/nf_core/pipelines/sync.py b/nf_core/pipelines/sync.py index e977d51fc4..2b994793e1 100644 --- a/nf_core/pipelines/sync.py +++ b/nf_core/pipelines/sync.py @@ -70,6 +70,7 @@ def __init__( gh_username: str | None = None, template_yaml_path: str | None = None, force_pr: bool = False, + blog_post: str | None = None, ): """Initialise syncing object""" @@ -92,6 +93,7 @@ def __init__( self.gh_username = gh_username self.gh_repo = gh_repo self.pr_url = "" + self.blog_post = blog_post self.config_yml_path, self.config_yml = nf_core.utils.load_tools_config(self.pipeline_dir) assert self.config_yml_path is not None and self.config_yml is not None # mypy @@ -377,7 +379,9 @@ def make_pull_request(self): pr_title = f"Important! Template update for nf-core/tools v{nf_core.__version__}" pr_body_text = ( "Version `{tag}` of [nf-core/tools](https://github.com/nf-core/tools) has just been released with updates to the nf-core template. " - "This automated pull-request attempts to apply the relevant updates to this pipeline.\n\n" + f"For more details, check out the blog post: {self.blog_post}\n\n" + if self.blog_post + else "" "Please make sure to merge this pull-request as soon as possible, " f"resolving any merge conflicts in the `{self.merge_branch}` branch (or your own fork, if you prefer). " "Once complete, make a new minor release of your pipeline.\n\n" From d7d19f637a3fe60460c2cfa669ed469137c838b9 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Tue, 28 Oct 2025 13:44:55 +0000 Subject: [PATCH 2/5] [automated] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82602513ca..d022e71694 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### General +- add optional link to blogpost to sync PR ([#3852](https://github.com/nf-core/tools/pull/3852)) + ### Template ### Linting From d2e2c13888d37dc4c94dcd18cccd5b7bc5bea461 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 28 Oct 2025 15:13:51 +0100 Subject: [PATCH 3/5] make blogpost input required --- .github/workflows/sync.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 7c9dcce478..9420cc5da9 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -24,6 +24,7 @@ on: description: "link to release blogpost" type: string default: "" + required: true # Cancel if a newer run is started concurrency: From 1b1172ce54cef15fd84dbecd159d4341202dbb47 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 28 Oct 2025 15:15:12 +0100 Subject: [PATCH 4/5] be more specific with blog_post type checks --- nf_core/pipelines/sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nf_core/pipelines/sync.py b/nf_core/pipelines/sync.py index 2b994793e1..94961dd3d4 100644 --- a/nf_core/pipelines/sync.py +++ b/nf_core/pipelines/sync.py @@ -70,7 +70,7 @@ def __init__( gh_username: str | None = None, template_yaml_path: str | None = None, force_pr: bool = False, - blog_post: str | None = None, + blog_post: str = "", ): """Initialise syncing object""" @@ -380,7 +380,7 @@ def make_pull_request(self): pr_body_text = ( "Version `{tag}` of [nf-core/tools](https://github.com/nf-core/tools) has just been released with updates to the nf-core template. " f"For more details, check out the blog post: {self.blog_post}\n\n" - if self.blog_post + if self.blog_post != "" else "" "Please make sure to merge this pull-request as soon as possible, " f"resolving any merge conflicts in the `{self.merge_branch}` branch (or your own fork, if you prefer). " From b3a1569974d1118352d00e65ce06f5fa5023b9a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Tue, 28 Oct 2025 15:21:19 +0100 Subject: [PATCH 5/5] Update .github/workflows/sync.yml --- .github/workflows/sync.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 9420cc5da9..e37b894a46 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -23,7 +23,6 @@ on: blog_post: description: "link to release blogpost" type: string - default: "" required: true # Cancel if a newer run is started