Skip to content

Instantly share code, notes, and snippets.

@elado
Last active June 23, 2021 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elado/29fb0fe0c822691928e424319bec5e8f to your computer and use it in GitHub Desktop.
Save elado/29fb0fe0c822691928e424319bec5e8f to your computer and use it in GitHub Desktop.
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