Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: restore commits for untyped section #89

Merged
merged 1 commit into from
Jun 30, 2024

Conversation

autumnjolitz
Copy link
Contributor

@autumnjolitz autumnjolitz commented Jun 25, 2024

Issue: #88
Resolves: #88

In versions prior to 2.4.1, Jinja templates could optionally generate change lines by accessing the "" section (e.g. untyped_section). This allowed for capturing of commit messages that would otherwise be lost.

Upon version 2.4.1, that was broken and untyped_section became always empty.

This PR restores the functionality.

@pawamoy
Copy link
Owner

pawamoy commented Jun 26, 2024

Thank you for the PR @autumnjolitz! Could you add a test for this fix, so that we don't allow regressions to happen again 😊?

@autumnjolitz
Copy link
Contributor Author

I do not understand your statement -- the ci/quality action returns:

src/git_changelog/commit.py:244:48: UP031 Use format specifiers instead of percent format
  src/git_changelog/commit.py:328:9: UP031 Use format specifiers instead of percent format
  src/git_changelog/commit.py:403:9: UP031 Use format specifiers instead of percent format

This PR -only- touches src/git_changelog/build.py while the complaint is regarding an entirely different file commit.py (from main as of yesterday afternoon)

Are you asking me to increase the scope of my PR to address an issue in a file I did not modify?

Please confirm if you wish me to handle that. I believe it is more likely a new version of ruff was released, was used in the github action, and is raising errors on previously "good" code.

@pawamoy
Copy link
Owner

pawamoy commented Jun 26, 2024

Sorry for the confusion, I meant to add a test in the tests suite, to make sure that this behavior (the one that is now fixed thanks to your PR) stays the same in the future.

The tests suite is located in the tests folder. You can get inspiration from the existing tests to write a new one that asserts this behavior.

Let me know if this is unclear and I'll try to provide more guidance :)

@pawamoy
Copy link
Owner

pawamoy commented Jun 26, 2024

Also, yes, please ignore the unrelated CI failure.

@autumnjolitz autumnjolitz force-pushed the bugfix/main/add-untyped-commits branch from 962597c to d878e42 Compare June 27, 2024 23:21
@autumnjolitz
Copy link
Contributor Author

Test added as requested.

Copy link
Owner

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

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

Perfect, thanks a lot!

@pawamoy pawamoy merged commit fe041fa into pawamoy:main Jun 30, 2024
15 of 16 checks passed
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.

Loss of ability to capture untyped section commits
2 participants