Skip to content

Commit

Permalink
Merge branch 'dev' into feature/setup-nextflow-v2-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu authored Mar 1, 2024
2 parents ae47251 + 721bab5 commit 50404a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _determine_change_type(pr_title) -> tuple[str, str]:
section, section_header = _determine_change_type(pr_title)

# Remove section indicator from the PR title.
pr_title = re.sub(rf"{section}[:\s]*", "", pr_title, flags=re.IGNORECASE)
pr_title = re.sub(rf"{section}:[\s]*", "", pr_title, flags=re.IGNORECASE)

# Prepare the change log entry.
pr_link = f"([#{pr_number}]({REPO_URL}/pull/{pr_number}))"
Expand All @@ -91,7 +91,6 @@ def _determine_change_type(pr_title) -> tuple[str, str]:
new_lines = [
f"- {pr_title} {pr_link}\n",
]

print(f"Adding new lines into section '{section}':\n" + "".join(new_lines))

# Finally, updating the changelog.
Expand Down Expand Up @@ -144,10 +143,11 @@ def _skip_existing_entry_for_this_pr(line: str, same_section: bool = True) -> st

# Parse version from the line `## v2.12dev` or
# `## [v2.11.1 - Magnesium Dragon Patch](https://github.com/nf-core/tools/releases/tag/2.11) - [2023-12-20]` ...
if not (m := re.match(r".*(v\d+\.\d+(dev)?).*", line)):
if not (m := re.match(r".*(v\d+\.\d+.\d*(dev)?).*", line)):
print(f"Cannot parse version from line {line.strip()}.", file=sys.stderr)
sys.exit(1)
version = m.group(1)
print(f"Found version: {version}")

if not inside_version_dev:
if not version.endswith("dev"):
Expand Down Expand Up @@ -209,6 +209,7 @@ def _skip_existing_entry_for_this_pr(line: str, same_section: bool = True) -> st
# If the line already contains a link to the PR, don't add it again.
line = _skip_existing_entry_for_this_pr(line, same_section=True)
section_lines.append(line)

else:
updated_lines.append(line)

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

### General

- Update ci to use nf-core/setup-nextflow v2
- Update CI to use nf-core/setup-nextflow v2
- Changelog bot: handle also patch version before dev suffix ([#2820](https://github.com/nf-core/tools/pull/2820))

## [v2.13.1 - Tin Puppy Patch](https://github.com/nf-core/tools/releases/tag/2.13) - [2024-02-29]

Expand Down

0 comments on commit 50404a3

Please sign in to comment.