Skip to content

Fix garbled message for multiple commits. Make each one an attachment. - #26

Open
vonbetz wants to merge 1 commit into
chriseldredge:masterfrom
vonbetz:master
Open

Fix garbled message for multiple commits. Make each one an attachment.#26
vonbetz wants to merge 1 commit into
chriseldredge:masterfrom
vonbetz:master

Conversation

@vonbetz

@vonbetz vonbetz commented Mar 25, 2016

Copy link
Copy Markdown

Fixes issue 24.

@legecha

legecha commented Mar 29, 2016

Copy link
Copy Markdown
Contributor

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