Skip to content

Instantly share code, notes, and snippets.

@trietsch
Last active December 14, 2022 15:55
Show Gist options
  • Save trietsch/9c8701445a3ab5b2033ac2f615b2d2c1 to your computer and use it in GitHub Desktop.
Save trietsch/9c8701445a3ab5b2033ac2f615b2d2c1 to your computer and use it in GitHub Desktop.
Automatically enable the edit commit message checkbox on GitLab MRs
// ==UserScript==
// @name Auto Edit Commit Message
// @version 1.0.1
// @description Automatically enables the 'edit commit message' box
// @author Robin Trietsch
// @match https://gitlab.com/*/merge_requests/*
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant none
// @updateURL https://gist.github.com/trietsch/9c8701445a3ab5b2033ac2f615b2d2c1/raw/d36b94d822b1b2cb7a669dc29da58af0b226ea0e/auto-edit-commit-message.user.js
// @downloadURL https://gist.github.com/trietsch/9c8701445a3ab5b2033ac2f615b2d2c1/raw/d36b94d822b1b2cb7a669dc29da58af0b226ea0e/auto-edit-commit-message.user.js
// ==/UserScript==
(function() {
'use strict';
waitForKeyElements('[data-testid="widget_edit_commit_message"]', n => { n.click() }, true);
})();
@trietsch
Copy link
Author

Install Tampermonkey, after install, click the Raw button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment