Created
August 18, 2020 16:51
-
-
Save useafterfree/423e9b50dd90b11e159895b2e4c69957 to your computer and use it in GitHub Desktop.
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 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')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Copy and paste this into any github
compare
URL