Solution on the client side. It was written for Tampermonkey / Chromium, but it seems to fit all other browsers. When the Merge Request form is opened, it fills in the "description", "who accepts" and "header" fields, if specified.
// ==UserScript== // @name Gitlab Merge Request additions // @namespace http://tampermonkey.net/ // @version 0.5 // @description Add title, labels, description & assignee_id to merge request // @match https://gitlab.*/merge_requests/new* // @run-at document-start // @grant none // ==/UserScript== (function() { 'use strict'; /* replace by own: */ var ASSIGNEE_ID = "666"; //var LABELS = "фича"; var DESCRIPTION = "Вставь описание, дундук!"; /* based on http://stackoverflow.com/questions/8486099/ code */ function parse_query_string() { var query = location.search.substr(1); var result = {}; query.split("&").forEach(function(part) { if(!part) return; part = decodeURIComponent(part.split("+").join(" ")); var eq = part.indexOf("="); var key = eq>-1 ? part.substr(0,eq) : part; var val = eq>-1 ? part.substr(eq+1) : ""; var from = key.indexOf("["); if(from==-1) result[decodeURIComponent(key)] = val; else { var to = key.indexOf("]"); var index = decodeURIComponent(key.substring(from+1,to)); key = decodeURIComponent(key.substring(0,from)); if(!result[key]) result[key] = []; if(!index) result[key].push(val); else result[key][index] = val; } }); return result; } var q = parse_query_string(); if( !q.merge_request || !q.merge_request.source_branch ) return; /* * Как правильно внедриться в DOM тут не придумал, поэтому * делаем редирект при необходимости добавить assignee_id * (потому и @run-at document-start) */ if( typeof ASSIGNEE_ID != "undefined" && parseInt(ASSIGNEE_ID) && !q.merge_request.assignee_id ) { var loc = Object.keys(q.merge_request).map( function(key) { return "merge_request[" + key + "]=" + q.merge_request[key]; }).join("&") + "&merge_request[assignee_id]=" + ASSIGNEE_ID; document.location.search = loc; return; } document.addEventListener("DOMContentLoaded", function() { var e = document.getElementById("merge_request_title"); if( e ) { /* title = BRANCH_NAME - 'empty placeholder' */ e.value = q.merge_request.source_branch + " - ''"; } if( typeof LABELS != "undefined" ) { /* id может быть и другим! */ e = document.getElementById("s2id_autogen3"); if( e ) e.value = LABELS; } if( typeof DESCRIPTION != "undefined" ) { e = document.getElementById("merge_request_description"); if( e ) e.value = DESCRIPTION; } }); })();
номер_тикета-описание. Most likely, you should write a feature request. Or create through API and propose correct post-factum. - D-sideassignee_idis still on the client in the URL is substituted, however, easier - sed'om on the conclusion ofgit push ...:) But, of course, I would like to solve the problem at a different level. - PinkTux