Created
October 8, 2021 01:29
-
-
Save mayankagarwal2402/24894cfaccc3a60446caed88f2fe731e to your computer and use it in GitHub Desktop.
hide/mark as viewed the vendor files in your PR if you manage vendor depencies inside your golang project for clutter free review
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
// Usage: | |
// open the files tab in the PR you want to review with vendor files | |
// copy paste following function in your developer tools console and run the func hideVendorFiles() | |
function hideVendorFiles() { | |
var lp = document.querySelectorAll('div.file-info a.Link--primary') | |
var lp2 = [...lp].filter(l => l.title.startsWith('vendor/')) | |
for (l of lp2) { | |
var chkbx = l | |
.parentNode | |
.parentNode | |
.querySelector('input.js-reviewed-checkbox') | |
console.log(chkbx.checked) | |
if (!chkbx.checked) { | |
chkbx.click() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment