Skip to content

Add --output CLI argument to export changelog to Markdown (#2019)#2020

Open
Mohima6 wants to merge 1 commit intosktime:mainfrom
Mohima6:patch-1
Open

Add --output CLI argument to export changelog to Markdown (#2019)#2020
Mohima6 wants to merge 1 commit intosktime:mainfrom
Mohima6:patch-1

Conversation

@Mohima6
Copy link

@Mohima6 Mohima6 commented Jan 14, 2026

Simplifies release workflows by avoiding manual copy-paste. Keeps backward compatibility: if no --output is provided, the changelog prints to stdout. Complements recent Markdown updates to the changelog generator (#2019)

Reference Issues/PRs

Closes #2019

What does this implement/fix?

This PR adds an optional CLI argument `--output` to the changelog generator.

- When `--output <file>` is provided, the generated changelog is written to the specified Markdown file.
- If no output file is provided, the changelog is printed to stdout, keeping the previous behavior.
- Captures both the rendered changelog and contributor list.

What should a reviewer concentrate their feedback on?

- Correct handling of CLI argument parsing.
- Proper writing of the Markdown file while retaining the printed output.
- Backward compatibility: ensure running without `--output` behaves as before.

Did you add any tests for the change?

Manual testing can be done by running:
- `python build_tools/changelog.py` (should print to terminal)
- `python build_tools/changelog.py --output CHANGELOG.md` (should create/update file)

Any other comments?

- This PR complements the previous Markdown changelog updates (#2016).
- Optional: future improvements could include simultaneous printing and file writing.

PR checklist

  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. ✅ Suggested title: [ENH] Add --output CLI argument to export changelog to Markdown (#2019)
  • Added/modified tests
  • Used pre-commit hooks when committing to ensure that code is compliant with hooks

Simplifies release workflows by avoiding manual copy-paste.  Keeps backward compatibility: if no --output is provided, the changelog prints to stdout.  Complements recent Markdown updates to the changelog generator (sktime#2019)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant