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

feat: added support for parsing headers in body, e.g. to support squashed commits #39

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

fredbi
Copy link

@fredbi fredbi commented Jun 12, 2019

Signed-off-by: Frederic BIDON fredbi@yahoo.com

What does this do / why do we need it?

added support for parsing headers in body, e.g. to support squashed commits

How this PR fixes the problem?

adds multiline_commits: true|false config option to enable parsing headers in body

What should your reviewer look out for in this PR?

Here is a sample regexp I am using:

pattern: '(?i)[\s\*\-]*?(\w*)\s*(?:\(([\w\.\-\/\*\s]*?)\))\s*:?\s*([^\n]*)'

Check lists

  • Test passed
  • Coding style (indentation, etc)

Additional Comments (if any)

{Please write here}

Which issue(s) does this PR fix?

fixes #27

…shed commits

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@coveralls
Copy link

coveralls commented Jun 12, 2019

Pull Request Test Coverage Report for Build 122

  • 8 of 27 (29.63%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to 69.62%

Changes Missing Coverage Covered Lines Changed/Added Lines %
commit_filter.go 5 7 71.43%
commit_parser.go 2 19 10.53%
Totals Coverage Status
Change from base Build 111: -0.5%
Covered Lines: 1485
Relevant Lines: 2133

💛 - Coveralls

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Copy link
Member

@wadackel wadackel left a comment

Choose a reason for hiding this comment

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

I'm terribly sorry for late response 😭 And thank you for contributing!

This feature is looks good to me.
Would you please change the path to git-chglog 🐶 ?

@@ -7,7 +7,7 @@ import (
"time"

"github.com/fatih/color"
chglog "github.com/git-chglog/git-chglog"
chglog "github.com/fredbi/git-chglog"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
chglog "github.com/fredbi/git-chglog"
chglog "github.com/git-chglog/git-chglog"

@fredbi
Copy link
Author

fredbi commented Oct 23, 2019

@tsuyoshiwada no worries we are all a bit sidetracked these days...
Yeah sure I'll change the path (I had to do this for my fork to build).

if opts.MultilineCommit {
// additional headers in body
body := input
body = p.reNotes.ReplaceAllString(body, "") // strip notes from mody
Copy link

Choose a reason for hiding this comment

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

Suggested change
body = p.reNotes.ReplaceAllString(body, "") // strip notes from mody
body = p.reNotes.ReplaceAllString(body, "") // strip notes from body

@okgolove
Copy link

Any chances this will be merged? :)

@ghostsquad
Copy link
Collaborator

looks like there still are some outstanding PR requests. Additionally, this needs a rebase to resolve conflicts.

@mavogel
Copy link
Member

mavogel commented Apr 30, 2021

@fredbi can we help to rebase this PR? :)

@tobidae
Copy link

tobidae commented Dec 20, 2022

Out of curiosity, was there a reason this PR didn't end up merged?

@drokath drokath mentioned this pull request Nov 4, 2023
2 tasks
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.

Squash merge in github PR
8 participants