##// END OF EJS Templates
pull-requests: make auto generated title for pull requests show also source Ref type .eg. branch feature1, instead of just name of the branch.
marcink -
r4433:fa362000 default
parent child Browse files
Show More
@@ -70,7 +70,7 b" replacing '-' and '_' into spaces"
70 * @param limit
70 * @param limit
71 * @returns {*[]}
71 * @returns {*[]}
72 */
72 */
73 var getTitleAndDescription = function(sourceRef, elements, limit) {
73 var getTitleAndDescription = function(sourceRefType, sourceRef, elements, limit) {
74 var title = '';
74 var title = '';
75 var desc = '';
75 var desc = '';
76
76
@@ -85,7 +85,9 b' var getTitleAndDescription = function(so'
85 }
85 }
86 else {
86 else {
87 // use reference name
87 // use reference name
88 title = sourceRef.replace(/-/g, ' ').replace(/_/g, ' ').capitalizeFirstLetter();
88 var normalizedRef = sourceRef.replace(/-/g, ' ').replace(/_/g, ' ').capitalizeFirstLetter()
89 var refType = sourceRefType;
90 title = 'Changes from {0}: {1}'.format(refType, normalizedRef);
89 }
91 }
90
92
91 return [title, desc]
93 return [title, desc]
@@ -508,7 +508,7 b''
508 ## create action
508 ## create action
509 <li>
509 <li>
510 <a href="#create-actions" onclick="return false;" class="menulink childs">
510 <a href="#create-actions" onclick="return false;" class="menulink childs">
511 <i class="tooltip icon-plus-circled" title="${_('Create')}"></i>
511 <i class="icon-plus-circled"></i>
512 </a>
512 </a>
513
513
514 <div class="action-menu submenu">
514 <div class="action-menu submenu">
@@ -250,9 +250,9 b''
250 var added = data['stats'][0]
250 var added = data['stats'][0]
251 var deleted = data['stats'][1]
251 var deleted = data['stats'][1]
252 var commonAncestorId = data['ancestor'];
252 var commonAncestorId = data['ancestor'];
253
253 var _sourceRefType = sourceRef()[0];
254 var prTitleAndDesc = getTitleAndDescription(
254 var _sourceRefName = sourceRef()[1];
255 sourceRef()[1], commitElements, 5);
255 var prTitleAndDesc = getTitleAndDescription(_sourceRefType, _sourceRefName, commitElements, 5);
256
256
257 var title = prTitleAndDesc[0];
257 var title = prTitleAndDesc[0];
258 var proposedDescription = prTitleAndDesc[1];
258 var proposedDescription = prTitleAndDesc[1];
General Comments 0
You need to be logged in to leave comments. Login now