You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears a recent update to PULL_REQUEST_TEMPLATE.md takes whatever the git init default branch is set to locally when building from the template. Working on a pipeline for a non-nf-core organisation, I performed a manual sync on my device (nf-core v3.1.2). Then, nf-core pipelines lint passed when I ran it locally. However, the linting.yml action workflow failed on GitHub with
╭─ [✗] 1 Pipeline Test Failed ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ ││ files_unchanged: .github/PULL_REQUEST_TEMPLATE.md does not match the template ││ │╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
On my device, I have set my default git branch to main with git config --global init.defaultBranch main. It appears the template takes this into account when creating PULL_REQUEST_TEMPLATE.md. However, the linting.yml GitHub Actions environment default git branch is master. When I set git config --global init.defaultBranch master locally and reran nf-core pipelines lint, I could reproduce the above error. I then ran again with --fix files_unchanged, pushed the changes, and the GitHub Action workflow succeeded.
Problems
nf-core pipelines lint will fail when run on a device where git config --global init.defaultBranch is set to anything other than the value used when creating PULL_REQUEST_TEMPLATE.md from the template
The linting.yml workflow will fail if the default branch set when creating PULL_REQUEST_TEMPLATE.md is anything other than master
Solution
Use the GitHub API to get the default_branch for the pipeline when creating the template (e.g. see here)
Command used and terminal output
Go to any pipeline on your machine and rungit config --global init.defaultBranch anything-differentthen run,nf-core pipelines lint
System information
nf-core/tools v3.1.2
macOS, Ubuntu Linux
Python 3.10, 3.11, 3.12
Nextflow 24.04, 24.11
The text was updated successfully, but these errors were encountered:
Description of the bug
Context
It appears a recent update to
PULL_REQUEST_TEMPLATE.md
takes whatever the git init default branch is set to locally when building from the template. Working on a pipeline for a non-nf-core organisation, I performed a manual sync on my device (nf-core v3.1.2). Then,nf-core pipelines lint
passed when I ran it locally. However, thelinting.yml
action workflow failed on GitHub withOn my device, I have set my default git branch to
main
withgit config --global init.defaultBranch main
. It appears the template takes this into account when creatingPULL_REQUEST_TEMPLATE.md
. However, thelinting.yml
GitHub Actions environment default git branch ismaster
. When I setgit config --global init.defaultBranch master
locally and rerannf-core pipelines lint
, I could reproduce the above error. I then ran again with--fix files_unchanged
, pushed the changes, and the GitHub Action workflow succeeded.Problems
nf-core pipelines lint
will fail when run on a device wheregit config --global init.defaultBranch
is set to anything other than the value used when creatingPULL_REQUEST_TEMPLATE.md
from the templateThe
linting.yml
workflow will fail if the default branch set when creatingPULL_REQUEST_TEMPLATE.md
is anything other thanmaster
Solution
Use the GitHub API to get the
default_branch
for the pipeline when creating the template (e.g. see here)Command used and terminal output
System information
The text was updated successfully, but these errors were encountered: