Skip to content

Instantly share code, notes, and snippets.

@lgk-bsw
Last active July 5, 2021 08:12
Show Gist options
  • Save lgk-bsw/91ae64083ce0d59ace6c8acc3fd67319 to your computer and use it in GitHub Desktop.
Save lgk-bsw/91ae64083ce0d59ace6c8acc3fd67319 to your computer and use it in GitHub Desktop.
Run this on the commits tab in a PR to get a list of cherry-pick commands
let queries = []
const rows = document.querySelectorAll(".TimelineItem-body .Box-row")
for (const r of rows) {
const label = r.querySelector(".Details .Link--primary")
const link = r.querySelector("a.BtnGroup-item")
const splitted = link.href.split("/")
queries.push(`${label.innerText}<br><code>git cherry-pick ${splitted[splitted.length - 1]}</code>`)
}
const start = '<label class="d-block px-3 py-2"><input type="checkbox" class="mr-1">'
document.querySelector(".pull-request-tab-content").innerHTML = start + queries.join('</label>' + start)
@lgk-bsw
Copy link
Author

lgk-bsw commented Jul 5, 2021

Run this on the browser console.

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