Skip to content

Add option to ignore parsing of commit body #733

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

Open
erschmidt opened this issue Oct 10, 2023 · 15 comments
Open

Add option to ignore parsing of commit body #733

erschmidt opened this issue Oct 10, 2023 · 15 comments
Assignees
Labels
confirmed Prevent from becoming stale feature A new feature or a feature request

Comments

@erschmidt
Copy link

Description

Add an option to ignore the body of a commit message during commit parsing. Ideally in commit_parser_options.

Use cases

From v7 to v8, the changelog seems to use all the information from the commit message. This introduces issues when using squash and merge and keeping the default commit messages (actually breaks the changelog for some reason; e.g., pre-commit is complaining about mixed line endings). Since the commit body - at least for me - does not contain any relevant information (for the changelog), I would rather not use it at all.

Possible implementation

Add a use_body flag in commit_parser_options

@erschmidt erschmidt added the feature A new feature or a feature request label Oct 10, 2023
@codejedi365
Copy link
Contributor

Working on a solution to fix the breaking of the changelog with squashed commits, with the intent to actually parse the squashed commits.

I'm glad I read this to possibly add the setting to ignore the commit body.

Also, just curious which parser are you using?

@erschmidt
Copy link
Author

Hey, glad to hear that! Currently had to revert back and would love to someday go back to the current version. I am using the default Angular parser.

@codejedi365
Copy link
Contributor

I appreciate it, I'll let you know when it gets merged and published

@github-actions github-actions bot added the stale label Mar 25, 2024
@codejedi365 codejedi365 added confirmed Prevent from becoming stale and removed stale labels Mar 27, 2024
@codejedi365 codejedi365 self-assigned this Mar 27, 2024
@codejedi365 codejedi365 linked a pull request Mar 27, 2024 that will close this issue
Copy link

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label May 27, 2024
@codejedi365
Copy link
Contributor

No update here yet, I have been working on other smaller features and fixes.

Copy link

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label Jul 27, 2024
@codejedi365
Copy link
Contributor

Unfortunately no movement here yet

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label Jul 28, 2024
Copy link

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label Sep 26, 2024
@codejedi365
Copy link
Contributor

Should have movement here in the next month as I'm re-engaging my fix for squash commits that got stale before

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label Sep 27, 2024
Copy link

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label Nov 26, 2024
@codejedi365
Copy link
Contributor

Very close to completion here between a new configurable feature of parsing squash commits and the subsequent change of the default changelog to only display the subject lines of commits by default.

This change is now possible because of squash commit parsing which is what we couldn't display unless we included the whole commit message in the changelog. Now it will no longer obscure squashed commit types and each change will be mixed in with the rest of the changes while maintaining a smaller and succinct commit history.

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label Nov 28, 2024
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Dec 20, 2024
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Dec 20, 2024
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 12, 2025
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 12, 2025
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 12, 2025
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 12, 2025
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 18, 2025
Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default Markdown changelog template and release notes template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 18, 2025
…tructuredText template

Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default ReStructured changelog template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 26, 2025
Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default Markdown changelog template and release notes template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 26, 2025
…tructuredText template

Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default ReStructured changelog template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 27, 2025
Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default Markdown changelog template and release notes template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 27, 2025
…tructuredText template

Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default ReStructured changelog template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 27, 2025
Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default Markdown changelog template and release notes template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 27, 2025
…tructuredText template

Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default ReStructured changelog template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 28, 2025
Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default Markdown changelog template and release notes template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 28, 2025
…tructuredText template

Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default ReStructured changelog template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
Copy link

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label Jan 28, 2025
@codejedi365
Copy link
Contributor

Squash commits are now supported with v9.17.0, but I decided to push the change of switching the default changelog to only the summary lines to the next major change, v10. If you want it today, take a look at the PSR custom template or data/templates/angular/md/.components/changes.md.j2 and modify the section that adds the rest of the descriptions to the listing.

codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Feb 1, 2025
Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default Markdown changelog template and release notes template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Feb 1, 2025
…tructuredText template

Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default ReStructured changelog template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
@github-actions github-actions bot removed the needs-update Needs status update from maintainers label Feb 1, 2025
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Feb 2, 2025
Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default Markdown changelog template and release notes template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Feb 2, 2025
…tructuredText template

Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default ReStructured changelog template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Feb 5, 2025
Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default Markdown changelog template and release notes template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Feb 5, 2025
…tructuredText template

Remove the code that writes out the rest of the commit message from the default
template.

BREAKING CHANGE: The default ReStructured changelog template
will no longer print out the entire commit message contents, instead, it will only
print the commit subject line. This comes to meet the high demand of better formatted
changelogs and requests for subject line only. Originally, it was a decision to not
hide commit subjects that were included in the commit body via the `git merge --squash`
command and PSR did not have another alternative.  At this point, all the built-in
parsers have the ability to parse squashed commits and separate them out into their
own entry on the changelog. Therefore, the default template no longer needs to write
out the full commit body. See the commit parser options if you want to enable/disable
parsing squash commits.

Resolves: python-semantic-release#733
Copy link

github-actions bot commented Apr 2, 2025

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label Apr 2, 2025
@codejedi365
Copy link
Contributor

Planning to release this as a major change very shortly to use the new template that does not include the rest of the commit body as the default. Stay tuned.

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Prevent from becoming stale feature A new feature or a feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants