Skip to content

Instantly share code, notes, and snippets.

@useafterfree
Created August 18, 2020 16:51
Show Gist options
  • Save useafterfree/423e9b50dd90b11e159895b2e4c69957 to your computer and use it in GitHub Desktop.
Save useafterfree/423e9b50dd90b11e159895b2e4c69957 to your computer and use it in GitHub Desktop.
let textNodesUnder = (el) => {
var n, a=[], walk=document.createTree
while(n = walk.nextNode() ) a.push(n)
return a;
}
let makeProjectLink = (dev) => `https:/
let makeProjectLinks = (line) => {
let projectLinks = line.match(/\[dev-
projectLinks && projectLinks.map((dev
let link = makeProjectLink(devLink)
line = line.replace(devLink, `[${de
});
return line;
};
const rowss = Array.from(document.query
const elements = ['.commit-message code
const label = ['commitMessage', 'commit
const outputList = [];
rowss.forEach((row, i) => {
const output = {};
output.authors = [];
const users = [];
elements.forEach((lookup, i) => {
found = row.querySelectorAll(lookup
if (found.length > 0) {
found.forEach((elem) => {
if (elem.alt && i == 2) {
output[label[i]].push(elem.al
} else {
const texts = textNodesUnder(
output[label[i]] = texts
.filter(t => t.data.match(/
.map(t => t.data)[0];
}
});
}
});
const { commitMessage, commitDetail,
// console.log(output);
const formatted = ''; //commitDetail
const issueText = issue ? ` (${issue}
const line = makeProjectLinks(`${hash
hash && outputList.push(line);
});
console.log(outputList.join('\n'));
@useafterfree
Copy link
Author

Copy and paste this into any github compare URL

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