GitLab - Squash n' Merge

Defaults to squash commits and remove source branches on merge

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==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;
  });
}