diff --git a/SourceCgit/SourceCgit.php b/SourceCgit/SourceCgit.php index 894510e69..c0987c6d5 100644 --- a/SourceCgit/SourceCgit.php +++ b/SourceCgit/SourceCgit.php @@ -279,7 +279,7 @@ public function commit_parents( $p_input ) { * @return string */ public function commit_message( $p_input ) { - preg_match( "#
(.*?)()#", $p_input, $t_matches); + preg_match( "#
(.*?)(|)#", $p_input, $t_matches); $t_message = trim( str_replace( '
', PHP_EOL, $t_matches[1] ) ); # Strip ref links and signoff spans from commit message diff --git a/SourceCgit/post-receive.sample b/SourceCgit/post-receive.sample new file mode 100755 index 000000000..bb7faa9d2 --- /dev/null +++ b/SourceCgit/post-receive.sample @@ -0,0 +1,13 @@ +#!/bin/sh + +# This is a secret password to be used by services sending commit data to Mantis. +API_KEY=6dcde9b4c68c4507f68b6ec3 +# Repository ID +ID=11 + +CURL=/usr/bin/curl + +URL="http://localhost/mantis/plugin.php?page=Source/import&api_key=${API_KEY}&id=${ID}" + +echo "Updating Changeset to Mantis Bug Tracker" +${CURL} ${URL}