Skip to content

Instantly share code, notes, and snippets.

@naganowl
Created May 24, 2018 22:04
Show Gist options
  • Save naganowl/2393e266fff46423a5bde0c5224b2f3a to your computer and use it in GitHub Desktop.
Save naganowl/2393e266fff46423a5bde0c5224b2f3a to your computer and use it in GitHub Desktop.
Check for abnormal line differences on the Files tab for a GitHub PR
([]).map.call(document.querySelectorAll('.diffstat.tooltipped'), (n) => {
const linesChanged = +n.innerHTML.match(/^\d+/)[0];
if(linesChanged > 100) {
// Log the line delta and the name of the file.
console.log(n, n.parentNode.querySelector('a'));
}
return linesChanged;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment