Skip to content

Instantly share code, notes, and snippets.

@haridsv
Created March 11, 2024 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haridsv/a65dea61e81ae47a268d1b4ea61b2fec to your computer and use it in GitHub Desktop.
Save haridsv/a65dea61e81ae47a268d1b4ea61b2fec to your computer and use it in GitHub Desktop.
Approve the PR with an LGTM comment.
document.getElementById("files_tab_counter").click();
setTimeout(function() {
document.querySelector(".js-review-changes").click();
document.getElementById("pull_request_review_body").value = "LGTM";
document.evaluate("//*/form/div[1]/div[2]/label/input", 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