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

How to read tag that created in the new line? #66

Closed
adamchenwei opened this issue Dec 16, 2016 · 7 comments
Closed

How to read tag that created in the new line? #66

adamchenwei opened this issue Dec 16, 2016 · 7 comments

Comments

@adamchenwei
Copy link

For example for a single commit message I have

feat(ad): make new ad
some note here
reg(ad): need a walk through

so in the 3rd line, there will be a reg tag, but even I added in the changelogrc, it seems still not get recognized.

How can I make it recognizable even its not at the beginning of the commit message?

@rafinskipg
Copy link
Owner

rafinskipg commented Dec 16, 2016 via email

@adamchenwei
Copy link
Author

@rafinskipg would you point to the correct section to work on? I can see if I can work on it! thanks

@adamchenwei
Copy link
Author

adamchenwei commented Dec 20, 2016

also, I wonder if I can just keep everything after the feat(): as content, without parsing as another tag at least? is there an easy way to achieve that? or the place I can do some tweak to adjust that? thanks a lot @rafinskipg

@rafinskipg
Copy link
Owner

hello @adamchenwei

I have done a test with your commit and i can get all as a body with the current version:

{ closes: [],
  breaks: [],
  hash: '',
  subject: 'make new ad',
  body: 'some note here\nreg(ad): need a walk through\n',
  type: 'feat',
  component: 'ad' }

What is the output you are getting?


About the other thing, getting 2 Section greps per commits, i'm not sure if its a good idea, it adds a lot of complexity. But the place to do it would be on the function organizeCommits in tasks/lib/organize-commits.js. I'm still not sure if its a feature that people will use, because the commit guideliness states to only do 1 thing per commit. Anyway, you can do a PR. If you need any help let me know (BTW : I'm refactoring stuff in the templating branch)

@adamchenwei
Copy link
Author

adamchenwei commented Dec 21, 2016

@rafinskipg ahhhhh cooool, so you are using \n , so what I did was doing git commit -m "feat(ad): make new ad -m "some note here" -m "reg(ad): need a walk through" I guess its different from just type in \n ... but when I do things like this, commit message shows me some thing super raw like feat(change log): new text\n AIR-1234\n reg(whole thing): goooooo through when I git log the commits.

Thought? Is that suppose to be? But I dont want \n to show up in the change log though, I want the actual new line. -m did help me achieve that, but seems git-changelog is seeing it as something else and eat it up for some reason. thought?

@rafinskipg
Copy link
Owner

HI @adamchenwei i will test it later but the changelog is markdown so a \n would not be shown. I think you were doing it right at the first time. You don't have to type the '\n' stuff.

You can try to just do git commit and write the commit message with then line jumps there if you want.

But i'll tell you tomorrow, i should do some tests with more messages and generate the logs.

@adamchenwei
Copy link
Author

@rafinskipg yes, I actually tried use shift + enter that actually worked lololol, wonder why there is a difference

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

No branches or pull requests

2 participants