# HG changeset patch # User Marcin Kuzminski # Date 2020-07-09 09:14:21 # Node ID fa36200030acd7028c96f1c29b0c0a822228c3c1 # Parent 4213c7c16546bbf8824a00147688715055dcfa15 pull-requests: make auto generated title for pull requests show also source Ref type .eg. branch feature1, instead of just name of the branch. diff --git a/rhodecode/public/js/src/rhodecode/pullrequests.js b/rhodecode/public/js/src/rhodecode/pullrequests.js --- a/rhodecode/public/js/src/rhodecode/pullrequests.js +++ b/rhodecode/public/js/src/rhodecode/pullrequests.js @@ -70,7 +70,7 @@ replacing '-' and '_' into spaces * @param limit * @returns {*[]} */ -var getTitleAndDescription = function(sourceRef, elements, limit) { +var getTitleAndDescription = function(sourceRefType, sourceRef, elements, limit) { var title = ''; var desc = ''; @@ -85,7 +85,9 @@ var getTitleAndDescription = function(so } else { // use reference name - title = sourceRef.replace(/-/g, ' ').replace(/_/g, ' ').capitalizeFirstLetter(); + var normalizedRef = sourceRef.replace(/-/g, ' ').replace(/_/g, ' ').capitalizeFirstLetter() + var refType = sourceRefType; + title = 'Changes from {0}: {1}'.format(refType, normalizedRef); } return [title, desc] diff --git a/rhodecode/templates/base/base.mako b/rhodecode/templates/base/base.mako --- a/rhodecode/templates/base/base.mako +++ b/rhodecode/templates/base/base.mako @@ -508,7 +508,7 @@ ## create action
  • - +