From de00162797ddd833a592b918e6405d7f87d26f15 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 13:20:46 +0100 Subject: [PATCH 1/3] set git defaultBranch to master in sync action --- .github/workflows/sync.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 625f00d24..c1d14d634 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -87,6 +87,10 @@ jobs: with: version: "latest-everything" + - name: Set git defaultBranch to master + run: | + git config --global init.defaultBranch master + - name: Run synchronisation if: github.repository == 'nf-core/tools' env: From 60ae1afaa7e568806602f579ee63577f5c0e4832 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 13:26:07 +0100 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eef49da4..73760131f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ - Don't break gitpod.yml with template string ([#3332](https://github.com/nf-core/tools/pull/3332)) - rocrate: remove duplicated entries for name and version ([#3333](https://github.com/nf-core/tools/pull/3333)) - rocrate: Update crate with version bump and handle new contributor field ([#3334](https://github.com/nf-core/tools/pull/3334)) +- Set git defaultBranch to master in sync action ([#3337](https://github.com/nf-core/tools/pull/3337)) ### Version updates From 5ee2d52d5ef6a2ffe6e6970b65fbde7e7f7539c8 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 14:30:14 +0100 Subject: [PATCH 3/3] use nextflow.config to set defaultBranch --- .github/workflows/sync.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index c1d14d634..b0464d274 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -87,9 +87,13 @@ jobs: with: version: "latest-everything" - - name: Set git defaultBranch to master + - name: Set Git default branch from nextflow.config and set git default branch to that or "master" run: | - git config --global init.defaultBranch master + defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2) + if [ -z "$defaultBranch" ]; then + defaultBranch="master" + fi + git config --global init.defaultBranch $defaultBranch - name: Run synchronisation if: github.repository == 'nf-core/tools'