Skip to content

Support for squash and merge#64

Merged
lalitkapoor merged 3 commits intolalitkapoor:masterfrom
304NotModified:handle-squash-merge-2
Mar 11, 2017
Merged

Support for squash and merge#64
lalitkapoor merged 3 commits intolalitkapoor:masterfrom
304NotModified:handle-squash-merge-2

Conversation

@304NotModified
Copy link
Copy Markdown
Contributor

Supersedes #62

test script:

npm uninstall -g github-changes
npm install -g https://github.com/304NotModified/github-changes/tarball/handle-squash-merge-2
github-changes -o nlog -r nlog -a --only-pulls --use-commit-body --date-format (YYYY/MM/DD)  

changedlog.md contains "allow different separator for Exception.Data (#1628) (@FroggieFrog)"

lalitkapoor and others added 2 commits October 16, 2016 23:32
- unfortunately it doesn't handle multiple authors for squash and merge
@lalitkapoor
Copy link
Copy Markdown
Owner

Thanks for working on this! I will give it a look.

@304NotModified
Copy link
Copy Markdown
Contributor Author

Works good for me anyway :)

@tkurki
Copy link
Copy Markdown

tkurki commented Jan 15, 2017

This produced a lot better (but not perfect) results for me. If it doesn't break existing functionality I'd urge you to merge it.

@lalitkapoor
Copy link
Copy Markdown
Owner

@tkurki Thanks for trying this out and for the feedback. Curious - what were the not perfect results for you?

@304NotModified
Copy link
Copy Markdown
Contributor Author

Don't think this will breaks something.

@tkurki
Copy link
Copy Markdown

tkurki commented Jan 15, 2017

At least SignalK/signalk-server#138 is still missing from the result of github-changes -o signalk -r signalk-server-node -a --only-pulls --use-commit-body.

@304NotModified
Copy link
Copy Markdown
Contributor Author

Whats the commit message of the squash?

@lalitkapoor
Copy link
Copy Markdown
Owner

lalitkapoor commented Jan 15, 2017

Have an idea - Lets put this behind a flag --squash-and-merge and put in the description that it's experimental (and what the signature of the commit message needs to include for it to get picked up).

I'm happy to start adding support for it, but because it does miss things I'm a little hesitant to have it enabled on by default.

If you can update with that I'll gladly pull it in :)

Once it's no longer experimental we can update the description.

What do you think?

@304NotModified
Copy link
Copy Markdown
Contributor Author

304NotModified commented Jan 15, 2017

This one is testing for (#123), but of course it's system dependent (eg github)

@tkurki
Copy link
Copy Markdown

tkurki commented Jan 16, 2017

Actually now that I reran the version off npm with --only-pulls --use-commit-body --data=pulls I got a result that LGTM. I had overlooked --data=pulls, it being deprecated, and --only-pulls does not do the same thing.

@lalitkapoor
Copy link
Copy Markdown
Owner

@tkurki given that the --data is deprecated do one of the other options work? maybe --only-merges?

Would like to not support --data anymore.

@tkurki
Copy link
Copy Markdown

tkurki commented Jan 16, 2017

Well, my vote goes for not removing --data=pulls until you have equivalent functionality available somehow. I'm perfectly happy with the results.

Don't know about the other options.

https://github.com/lalitkapoor/github-changes/blob/master/bin/index.js#L513

@lalitkapoor
Copy link
Copy Markdown
Owner

lalitkapoor commented Jan 16, 2017

@tkurki nice! I had forgotten that --data=pulls uses the github pull request api and not the commit api. That will actually catch all the pull requests :) regardless of the merge strategy. The one thing it won't be able to do though is give attribution to multiple committers, if there were any in that pull request. I think this is an acceptable tradeoff though.

@304NotModified Your solution works for the case when --data=commits (the default), but depends on a (#123) signature in the squash commit message (which is what it defaults to in github). So, I'd like to merge your pull request in too. Do you mind adding a note in your pull request to the readme for how this library handles the squash and merge strategy?

Thank you both for looking into this and debugging this!

@304NotModified
Copy link
Copy Markdown
Contributor Author

Do you mind adding a note in your pull request to the readme for how this library handles the squash and merge strategy?

Sure, but dunno where to add it. It's not "Installation" or "Example usage". Maybe adding a FAQ to the wiki is a better idea?

@lalitkapoor
Copy link
Copy Markdown
Owner

@304NotModified I think at the bottom of the readme we can start a FAQ section and this can be only thing in it for now.

@304NotModified
Copy link
Copy Markdown
Contributor Author

isn't the wiki a better place for it?

@lalitkapoor
Copy link
Copy Markdown
Owner

lalitkapoor commented Jan 26, 2017

@304NotModified I think since there isn't a lot of content and I'd like for the user to get that information as easily and quickly as possible the Readme will do just fine.

I'm a fan of adding to the Readme till it no longer makes sense.

@304NotModified
Copy link
Copy Markdown
Contributor Author

I've added the FAQ. Please merge.

@lalitkapoor lalitkapoor merged commit cc0fbb0 into lalitkapoor:master Mar 11, 2017
@304NotModified 304NotModified deleted the handle-squash-merge-2 branch December 29, 2020 22:25
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.

3 participants