Skip to content

Instantly share code, notes, and snippets.

@mountainash
Created April 22, 2024 12:39
Show Gist options
  • Save mountainash/6618c7d91d6778122354a1f5f8c4916d to your computer and use it in GitHub Desktop.
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
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