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

Use of pre-commit #142

Closed
blink1073 opened this issue Mar 29, 2022 · 11 comments
Closed

Use of pre-commit #142

blink1073 opened this issue Mar 29, 2022 · 11 comments

Comments

@blink1073
Copy link
Member

Description

I added the https://pre-commit.ci/ GitHub App to the org. By default this means that any repo with a .pre-commit-config.yaml file will get a weekly PR to update the versions used. This will help us keep them up to date easier.

cf jupyterlab/jupyterlab#12272

@blink1073 blink1073 added the bug Something isn't working label Mar 29, 2022
@fcollonval
Copy link
Member

This turns CI to red when pre-commit is not configured for example for jupyterlab/pull-request: https://results.pre-commit.ci/run/github/198751265/1648550407.f6iK8ik0SG-Ao664S91hLg

Would it be possible to turn it on only on jupyterlab? and maybe on jupyterlab_server?

I'll raise the question at weekly call.

@blink1073
Copy link
Member Author

Oh bummer, I thought it would just not run if the file wasn't there. Sure, I'll update to scope it to those two repos.

@blink1073
Copy link
Member Author

Done!

@blink1073
Copy link
Member Author

For those with access, the settings are at: https://github.com/organizations/jupyterlab/settings/installations/24508674

@jtpio
Copy link
Member

jtpio commented Mar 29, 2022

Is there a way to re-run the checks?

Looks like it fails on the latest commit on master:

Not sure if it's a real failure or just need to be kicked.

@blink1073
Copy link
Member Author

It seems like the jsonschema download can't work on the service, we probably need to skip it.

@blink1073
Copy link
Member Author

@blink1073
Copy link
Member Author

I removed it from JupyterLab as well, because we don't have access to pypi or npm to download the files needed to run the local hooks.

What could be done instead is to use the official mirrors for prettier and eslint. Since there is isn't an official mirror for stylelint, that could be run in GitHub actions only. So the skip config would look like:

ci:
  skip: [check-jsonschema, stylelint, eslint]

That would involve trying to de-conflict what is currently part of the top level package.json including dependencies. I think what would happen is that the versions of the plugins would need to be included in the eslint config, and a separate job for eslint:check:typed would need to be run as a manual hook, which wouldn't run on pre-commit.ci either. So this all seems like a lot of work for the autoupdate feature...

@blink1073
Copy link
Member Author

Ha, another, less-hacky idea is to skip all of the local checks on pre-commit.ci.

@blink1073 blink1073 removed the bug Something isn't working label Mar 30, 2022
@fcollonval
Copy link
Member

@blink1073 could we consider this as resolved?

@blink1073
Copy link
Member Author

Sounds good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants