Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
GitHub mark files as viewed in a pull request
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