Last active
July 5, 2021 08:12
-
-
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
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
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run this on the browser console.