Created
February 11, 2020 22:35
-
-
Save electricg/9ad679c5ff40cb2d3365af54d9020ec5 to your computer and use it in GitHub Desktop.
Revisions
-
electricg created this gist
Feb 11, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ const options = { master: 'merge', staging: 'squash' }; const base = document.querySelector('#partial-discussion-header .base-ref').textContent.trim(); const what = options[base]; [...document.querySelectorAll('button[data-details-container=".js-merge-pr"]')].forEach(item => { item.disabled = true; }); document.querySelector(`.select-menu-merge-method button[value="${what}"]`).click(); document.querySelector(`button[data-details-container=".js-merge-pr"][class*="${what}"]`).disabled = false;