Skip to content

Dim more PRs opened by bots in dim-bots - #5512

Merged
cheap-glitch merged 1 commit into
mainfrom
dim-more-bot-prs
Mar 16, 2022
Merged

cheap-glitch merged 1 commit into
mainfrom
dim-more-bot-prs

Conversation

@cheap-glitch

@cheap-glitch cheap-glitch commented Mar 16, 2022 •

Copy link
Copy Markdown
Contributor

Dim more bots PRs + refactor a bit and add an explanatory comment on each extra selector

Test URLs

Screenshot

Before

before

After

after

'.opened-by [href*="author%3Aapp%2F"]',
'.labels [href$="label%3Abot"]',
];
const prSelectors = botNames.map(bot => `.opened-by [title="pull requests opened by ${bot}"]`);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows re-using the list of bot names to also hide potential PRs opened by them.

I'm guessing not all of them can do that, but their usernames are reserved anyway so we don't risk hiding legitimate PRs.

Comment on lines +25 to +28
prSelectors.push(
'.opened-by [href*="author%3Aapp%2F"]', // Search query `is:pr+author:app/*`
'.labels [href$="label%3Abot"]', // PR tagged with `bot` label
);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept the more "generic" selectors because they allow hiding Dependabot, Renovate and maybe others without adding them to the list of names.

'.opened-by [href*="author%3Aapp%2F"]', // Search query `is:pr+author:app/*`
'.labels [href$="label%3Abot"]', // PR tagged with `bot` label
);
const prSelector = prSelectors.join(',');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really needed, but added for consistency with commitSelector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants