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 garbled message for multiple commits. Make each one an attachment. #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vonbetz
Copy link

@vonbetz vonbetz commented Mar 25, 2016

Fixes issue 24.

@legecha
Copy link
Contributor

legecha commented Mar 29, 2016

Unfortunately this doesn't work for commits that contain multiple lines in the message.

{ "fallback" : "", "color" : "good", "fields" : [{"title":"leonard","value":"multiline","short":false}]},

- test
- message
- here
- test

{ "fallback" : "", "color" : "good", "fields" : [{"title":"leonard","value":"This is a test","short":false}]},

- that has multiple
- lines so we can
- see what the issue
- is with the
- post receive hook

{ "fallback" : "", "color" : "good", "fields" : [{"title":"leonard","value":"another test...","short":false}]},


{ "fallback" : "", "color" : "good", "fields" : [{"title":"leonard","value":"more testing","short":false}]},

I'm not experienced enough with multiline sed or I'd offer a suggestion. Or maybe Perl or something would be a better choice?

Thanks for the fix by the way, for single-line commits it's wonderful. Hopefully this will get integrated! :)

I've aded a new pull request (#27) which fixes both the multiline commit message and multiple commit message problems.

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.

2 participants