GitLab - Squash n' Merge

Defaults to squash commits and remove source branches on merge

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        GitLab - Squash n' Merge
// @description Defaults to squash commits and remove source branches on merge
// @author      Sam McLeod | https://twitter.com/s_mcleod | https://smcleod.net
// @include     /^https?://gitlab.*/.*/.*/merge_requests/new*
// @icon         https://gitlab.com/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png
// @license MIT
// @version 1.0.1
// check remove-source-branch-input checkbox
// check merge-param-checkbox checkbox
//
// @namespace https://greasyfork.org/users/97169
// ==/UserScript==

// Check remove source branch
checkThem([].slice.call(document.querySelectorAll('input[type="checkbox"]' && 'input[id="merge_request_force_remove_source_branch"]')));

// Check squash merge request
checkThem([].slice.call(document.querySelectorAll('input[type="checkbox"]' && 'input[id="merge_request_squash"]')));

function checkThem(nodes) {
  nodes.forEach(function (n) {
    n.checked = true;
  });
}