Last active
June 12, 2024 15:14
-
-
Save haridsv/a65dea61e81ae47a268d1b4ea61b2fec to your computer and use it in GitHub Desktop.
Approve the PR with an LGTM comment.
This file contains 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 characters
document.getElementById("files_tab_counter").click(); | |
setTimeout(function approvePR() { | |
var ele = document.querySelector(".js-review-changes"); | |
if (! ele) { | |
setTimeout(approvePR, 300); | |
return; | |
} | |
ele.click(); | |
document.getElementById("pull_request_review_body").value = "LGTM"; | |
document.evaluate("//*/form/div[1]/fieldset/div/div[2]/span/label", document.querySelector("#review-changes-modal > div"), null, XPathResult.ANY_TYPE, null).iterateNext().click(); | |
document.evaluate("//*/form/div[2]/button//*[contains(text(), 'Submit review')]", document.querySelector("#review-changes-modal > div"), null, XPathResult.ANY_TYPE, null).iterateNext().click() | |
}, 300); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment