Last active
June 23, 2021 19:51
-
-
Save elado/29fb0fe0c822691928e424319bec5e8f to your computer and use it in GitHub Desktop.
GitHub mark files as viewed in a pull request
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
ignore = /packages\/.+\/(.eslintignore|package.json|jest.config.js)/ | |
clicks = $$('.js-toggle-user-reviewed-file-form').filter(f => !f._method && ignore.test(f.path.value)).map(f=>f.querySelector('input[type="checkbox"]')) | |
randomSleep = () => new Promise(r => setTimeout(r, Math.random() * 50)) | |
while (clicks.length) { await randomSleep(); console.log('marking as viewed...', clicks.length, ' to go'); clicks.pop().click() } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment