feat(changelog): add merge-prerelease flag by MoritzBoehme · Pull Request #703 · commitizen-tools/commitizen · GitHub
Skip to content

feat(changelog): add merge-prerelease flag - #703

Merged
woile merged 3 commits into
commitizen-tools:v3from
MoritzBoehme:merge-prerelease
Apr 17, 2023
Merged

feat(changelog): add merge-prerelease flag#703
woile merged 3 commits into
commitizen-tools:v3from
MoritzBoehme:merge-prerelease

Conversation

@MoritzBoehme

@MoritzBoehme MoritzBoehme commented Apr 13, 2023

Copy link
Copy Markdown

Description

Added a --merge-prerelease flag and config option as described in #687.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

Steps to Test This Pull Request

Additional context

The dependency codecov seems to be no longer available. I can try to fix it in this pull request, but could also create a new one, depending on what is preferred.
I have now to my own frustration fixed the codecov action in the second commit. This also closes #685

@MoritzBoehme
MoritzBoehme force-pushed the merge-prerelease branch 6 times, most recently from ebf3f73 to d5f6722 Compare April 13, 2023 07:02
@MoritzBoehme
MoritzBoehme marked this pull request as ready for review April 13, 2023 07:02
Comment thread commitizen/cli.py
@MoritzBoehme MoritzBoehme changed the title feat(changelog): add merge_prereleases flag Draft: feat(changelog): add merge_prereleases flag Apr 13, 2023
@MoritzBoehme MoritzBoehme changed the title Draft: feat(changelog): add merge_prereleases flag feat(changelog): add merge_prereleases flag Apr 13, 2023
@codecov

codecov Bot commented Apr 13, 2023

Copy link
Copy Markdown

@MoritzBoehme
MoritzBoehme force-pushed the merge-prerelease branch 3 times, most recently from cfbbfb5 to ab957a4 Compare April 13, 2023 08:23
@MoritzBoehme

MoritzBoehme commented Apr 13, 2023

Copy link
Copy Markdown
Author

It seems the pre-commit hook prettier is failing for windows only (Seems as if it did succeed at least once there too). Weirdly it works for windows + python3.10 tough.
No idea, why this would be the case :/

@MoritzBoehme

MoritzBoehme commented Apr 13, 2023

Copy link
Copy Markdown
Author

Found out another reason why test would randomly fail. It's caused by concurrent tests all accessing the same temporary file for the backup of the commit message. Changing the test script to run test independently seems to solve the issue.

@MoritzBoehme

Copy link
Copy Markdown
Author

@woile could you perhaps have a look at the pr? Do you maybe have some idea on how to keep prettier from failing?
Thanks for this awesome project btw =)

@MoritzBoehme MoritzBoehme changed the title feat(changelog): add merge_prereleases flag feat(changelog): add merge-prerelease flag Apr 16, 2023
Comment thread tests/test_changelog.py Outdated
gitcommits, tags, parser, changelog_pattern, merge_prerelease=True
)

assert tuple(tree) == COMMITS_TREE_MERGED_PRERELEASES

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should COMMITS_TREE_MERGED_PRERELEASES be renamed to COMMITS_TREE_AFTER_MERGED_PRERELEASES?

How is this test different than just test_generate_tree_from_commits?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah, that name is better. It's different in the sense, that COMMITS_TREE_AFTER_MERGED_PRERELEASES does not contain pre-releases (there were 2) and the changes of them are now part of the next non-prerelease.

@woile

woile commented Apr 16, 2023

Copy link
Copy Markdown
Member

How does this feature affect existing changelogs?
Will it update old pre-releases as well? could we add a test for it?

@woile

woile commented Apr 16, 2023

Copy link
Copy Markdown
Member

Can you point this PR to v3? thanks!

@MoritzBoehme

Copy link
Copy Markdown
Author

@MoritzBoehme
MoritzBoehme changed the base branch from master to v3 April 16, 2023 15:06
@MoritzBoehme
MoritzBoehme force-pushed the merge-prerelease branch 2 times, most recently from bde4bdc to 44ace73 Compare April 16, 2023 15:16
Moritz Böhme added 2 commits April 16, 2023 17:24
Running tests concurrently can cause temporary files, such as the file
used to backup the commit message, to be deleted by one test but
accessed by another test later on.
@MoritzBoehme
MoritzBoehme requested a review from woile April 16, 2023 15:29
@woile
woile merged commit 7a8c2d8 into commitizen-tools:v3 Apr 17, 2023
Apkawa pushed a commit to Apkawa/commitizen that referenced this pull request Apr 17, 2023
Apkawa pushed a commit to Apkawa/commitizen that referenced this pull request Apr 18, 2023
… issue with freeze_time

Signed-off-by: apkawa <action@github.com>

commitizen-tools#703
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.

codecov dev dependency is deprecated

2 participants