diff --git a/Source/Source.API.php b/Source/Source.API.php index 60c6f88..fb96ad1 100644 --- a/Source/Source.API.php +++ b/Source/Source.API.php @@ -274,8 +274,8 @@ $t_resolution = config_get( 'plugin_Source_bugfix_resolution' ); $t_handler = config_get( 'plugin_Source_bugfix_handler' ); $t_message_template = str_replace( - array( '$1', '$2', '$3', '$4', '$5', '$6' ), - array( '%1$s', '%2$s', '%3$s', '%4$s', '%5$s', '%6$s' ), + array( '$1', '$2', '$3', '$4', '$5', '$6', '$7' ), + array( '%1$s', '%2$s', '%3$s', '%4$s', '%5$s', '%6$s', '%7$s' ), config_get( 'plugin_Source_bugfix_message' ) ); $t_mappings = array(); @@ -323,10 +323,16 @@ } } } + # add reponame for bitbucket + if(isset($t_repos[ $t_changeset->repo_id ]->info['bit_reponame'])){ + $l_reponame = $t_repos[ $t_changeset->repo_id ]->info['bit_reponame']; + } else { + $l_reponame = ''; + } # generate a note message if ( $t_enable_message ) { - $t_message = sprintf( $t_message_template, $t_changeset->branch, $t_changeset->revision, $t_changeset->timestamp, $t_changeset->message, $t_repos[ $t_changeset->repo_id ]->name, $t_changeset->id ); + $t_message = sprintf( $t_message_template, $t_changeset->branch, $t_changeset->revision, $t_changeset->timestamp, $t_changeset->message, $t_repos[ $t_changeset->repo_id ]->name, $t_changeset->id, $l_reponame ); } else { $t_message = ''; } diff --git a/Source/lang/strings_english.txt b/Source/lang/strings_english.txt index f80bfc8..efc94b8 100644 --- a/Source/lang/strings_english.txt +++ b/Source/lang/strings_english.txt @@ -95,7 +95,7 @@ $s_plugin_Source_bugfix_resolution = 'Bug Fixed Resolution'; $s_plugin_Source_bugfix_handler = 'Bug Fixed Assign To Committer'; $s_plugin_Source_bugfix_message = 'Bug Fixed Message Template'; -$s_plugin_Source_bugfix_message_info = 'Use $1 for branch, $2 for revision, $3 for timestamp, $4 for commit message, $5 for repository name, or $6 for changeset ID.'; +$s_plugin_Source_bugfix_message_info = 'Use $1 for branch, $2 for revision, $3 for timestamp, $4 for commit message, $5 for repository name, or $6 for changeset ID, $7 for reponame'; $s_plugin_Source_bugfix_message_view_status = 'Bug Fixed Message View State'; $s_plugin_Source_bugfix_message_view_status_info = 'Note: if the changeset\'s author/committer does not have private_bugnote_threshold, the note will be Public regardless of this setting.'; $s_plugin_Source_reset = 'Reset to default';