Created
April 22, 2024 12:39
-
-
Save mountainash/6618c7d91d6778122354a1f5f8c4916d to your computer and use it in GitHub Desktop.
Arc Boost to reduce the noise that Dependabot makes in GitHubs Pull Request view
This file contains hidden or 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
const reduceDependabotNoise = () => { | |
console.info('Custom Arc Boost ran'); | |
if (window.location.pathname.endsWith('pulls')) { | |
document.querySelectorAll('.js-issue-row').forEach((issue) => { | |
const isDependabot = /dependabot/.test( | |
issue.querySelector('.opened-by')?.innerText, | |
); | |
if (isDependabot) { | |
issue.style.opacity = 0.25; | |
issue | |
.querySelectorAll('.IssueLabel') | |
.forEach((label) => label.remove()); | |
issue.querySelector('.text-small').remove(); | |
} | |
}); | |
} | |
}; | |
navigation.addEventListener('navigate', () => { | |
window.setTimeout(reduceDependabotNoise, 500); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment