Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass checks on all repo pages (not only PR conversations) #5920

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

lesteve
Copy link
Contributor

@lesteve lesteve commented Aug 19, 2022

bypass-checks works great in PR conversations, thanks a lot for this, I wondered for a long time how to get rid of this additional click until I realised refined-github had the feature!

The thing is that ci-links will add CI status in other pages outside of PR conversations, and the links are not rewritten by bypass-checks.

In this PR I used a similar code as in bypass-checks as in ci-links:

void features.add(import.meta.url, {
include: [
pageDetect.isRepo,
],
exclude: [
pageDetect.isEmptyRepo,
],
awaitDomReady: false,
init,
});

I believe with this change ,bypass-checks will run both on PR conversations and all pages where ci-links adds a CI status.

I also tested this locally following https://github.com/refined-github/refined-github/blob/main/contributing.md and it seems to work fine.

Test URLs

On this root repo page https://github.com/scikit-learn/scikit-learn.

Clicking on the CI status added by ci-links will show some URL that points to Github checks i.e. are not rewritten by bypass-checks

Screenshot

image

You can see on the bottom left that some links, namely the Azure Pipelines ones (blue icons) are not rewritten to skip the Check page, i.e. it goes to github.com/scikit-learn/scikit-learn/runs/<something>)

Copy link
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

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

I think it makes sense. Since the feature is already using the new observer, this shouldn't be particularly heavy and then HTTP requests only fire when the popup is open. 💯

@fregante fregante merged commit 652b486 into refined-github:main Aug 23, 2022
@lesteve lesteve deleted the patch-1 branch August 23, 2022 10:55
@lesteve
Copy link
Contributor Author

lesteve commented Aug 23, 2022

Nice to see this one merged 😄!

@fregante
Copy link
Member

Thank you for your contribution Loïc!

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.

None yet

2 participants