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: search for release commit with commit_subject #488

Conversation

d-ryzhykau
Copy link
Contributor

@d-ryzhykau d-ryzhykau commented Aug 13, 2022

Use release commit template settings in release commit search.

Use commit_subject template in release commit search.
@bernardcooke53
Copy link
Contributor

@d-ryzhikov this looks like a good catch! Since we don't want to identify the current version with a commit that doesn't match the specified commit_subject, is it worth adding an explicit test that a commit in the log which doesn't match the commit_subject template but contains the current version returns None?

Add test to check that commits containing current version
but not matching commit_subject pattern are ignored.
@d-ryzhykau
Copy link
Contributor Author

@bernardcooke53 I've added a test for a case when there is a commit with a message containing current version but the subject doesn't match commit_subject setting. However, in this case evaluate_version_bump shouldn't return None. Instead it should not evaluate this commit as the release commit and continue the search.

@bernardcooke53
Copy link
Contributor

@d-ryzhikov looks good! Yes you're right about the bump, in my head I was thinking of an out-of-scope commit not triggering a bump - the way you've done it is good too 🙂

@d-ryzhykau
Copy link
Contributor Author

I updated the release commit search logic in evaluate_version_bump and in generate_changelog. Now the release commit check is more strict: a commit message for a target version is constructed and only commits with exactly matching messages are considered to be target version commits.

Copy link
Member

@danth danth left a comment

Choose a reason for hiding this comment

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

This will break if the commit_subject is reconfigured - but I think it's an improvement over the current behaviour.

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.

None yet

3 participants