Skip to content

Conversation

@ErikBjare
Copy link
Member

@ErikBjare ErikBjare commented Oct 2, 2025

Add optional flag to prepend version header and adjust heading levels, useful for projects that want to include changelogs in their docs with proper heading hierarchy.

Changes

When --add-version-header is enabled:

  • Adds # vX.Y.Z header at the top
  • Adjusts # Contributors to ## Contributors
  • Adjusts # Changelog to ## Changelog

Motivation

This keeps the default behavior unchanged while allowing docs-oriented projects (like gptme) to generate properly formatted release notes that integrate well with Sphinx/RST documentation.

The flag is opt-in and doesn't affect ActivityWatch's existing changelog generation workflow.


Important

Adds --add-version-header flag to build_changelog.py to prepend version header and adjust heading levels for documentation integration.

  • Behavior:
    • Adds --add-version-header flag to build_changelog.py to prepend # vX.Y.Z header and adjust heading levels.
    • Changes # Contributors to ## Contributors and # Changelog to ## Changelog when flag is used.
  • Functions:
    • Updates main() to parse --add-version-header flag and pass it to build().
    • Modifies build() to apply header and heading adjustments based on add_version_header flag.

This description was created by Ellipsis for 04df7a1. You can customize this summary. It will automatically update as commits are pushed.

Add optional flag to prepend version header and adjust heading levels,
useful for projects that want to include changelogs in their docs with
proper heading hierarchy.

When enabled:
- Adds '# vX.Y.Z' header at the top
- Adjusts '# Contributors' to '## Contributors'
- Adjusts '# Changelog' to '## Changelog'

This keeps the default behavior unchanged while allowing docs-oriented
projects (like gptme) to generate properly formatted release notes.
@ErikBjare ErikBjare changed the title feat: add --add-version-header flag to build_changelog.py build: add --add-version-header flag to build_changelog.py Oct 2, 2025
@ErikBjare ErikBjare merged commit ade74fd into master Oct 2, 2025
7 checks passed
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 04df7a1 in 1 minute and 31 seconds. Click for details.
  • Reviewed 45 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. scripts/build_changelog.py:67
  • Draft comment:
    New '--add-version-header' flag added to argparse. The help text is clear, but ensure documentation elsewhere explains its effect.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. scripts/build_changelog.py:96
  • Draft comment:
    The flag is correctly passed to the build() function via add_version_header; no issues here.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. scripts/build_changelog.py:362
  • Draft comment:
    The build() function signature now includes the new parameter 'add_version_header' with a default value of False. This integration is straightforward.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. scripts/build_changelog.py:435
  • Draft comment:
    In the add_version_header block, version header prepending and heading adjustments are done via simple string replacement. Consider using regex to handle potential variations in whitespace or formatting for '# Contributors' and '# Changelog'.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While regex could handle more variations in whitespace, the current approach is actually quite reasonable since: 1. The headings being replaced are generated by the same code, so their format is consistent 2. The current code is simpler and more readable 3. There's no evidence of whitespace variation being a real issue 4. The code already works reliably The suggestion could make the code more robust against potential edge cases with whitespace variations. The current approach might break if the heading format changes. Since the headings are generated by this same code, not user input, whitespace variations aren't a real concern. The simpler string.replace() approach is more maintainable. The comment should be deleted. The current implementation is appropriate for the controlled environment where the headings are generated by the same code.

Workflow ID: wflow_lYb4o8VvmreFdKpU

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

ErikBjare added a commit to gptme/gptme that referenced this pull request Oct 2, 2025
The --add-version-header feature has been merged into ActivityWatch upstream
(ActivityWatch/activitywatch#1179), so we can go back
to downloading the script instead of maintaining our own version.
Skogix pushed a commit to SkogAI/gptme that referenced this pull request Dec 12, 2025
The --add-version-header feature has been merged into ActivityWatch upstream
(ActivityWatch/activitywatch#1179), so we can go back
to downloading the script instead of maintaining our own version.
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.

2 participants