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 pre-commit bot #7171

Merged
merged 2 commits into from Sep 28, 2023
Merged

Use pre-commit bot #7171

merged 2 commits into from Sep 28, 2023

Conversation

jarrodmillman
Copy link
Contributor

@jarrodmillman jarrodmillman commented Sep 28, 2023

Description

See #7172

The bot is faster than the GH action. It provides the option of autofixing PR linting errors with a comment on the PR. And it also will create PRs to update the pre-commit repos.

Checklist

Release note

Summarize the introduced changes in the code block below in one or a few sentences. The
summary will be included in the next release notes automatically:

...

@jarrodmillman jarrodmillman added the 🔧 type: Maintenance Refactoring and maintenance of internals label Sep 28, 2023
Copy link
Member

@mkcor mkcor left a comment

Choose a reason for hiding this comment

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

Yay!

.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
Co-authored-by: Marianne Corvellec <marianne.corvellec@ens-lyon.org>
Copy link
Member

@lagru lagru left a comment

Choose a reason for hiding this comment

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

So we just need to comment "pre-commit.ci autofix" to our comment and then it goes and does the fix? There is no automated action besides a check that appears in the list of other checks?

In that case 👍

@jarrodmillman
Copy link
Contributor Author

And the bot will provide a report when there is an issue and tell you that you can fix it by adding a "pre-commit.ci autofix" comment. So no need to document it ourselves.

@lagru
Copy link
Member

lagru commented Sep 28, 2023

And the bot will provide a report when there is an issue and tell you that you can fix it by adding a "pre-commit.ci autofix"

So is it creating a comment like pep8speaks does?

(Sorry for the duplicate comment, bad mobile data connection in Germany)

@jarrodmillman
Copy link
Contributor Author

It will produce a red x like
2023-09-28T09:43:41,404078317-07:00

If you click on the Details for the pre-commit.ci ..., you are taken to:
https://results.pre-commit.ci/run/github/327679346/1693837106.vMDsW5paTUS464GkvaxVHA

That pages has been slightly updated, since I did what it said. It previously said to do this
scientific-python/specs#264 (comment)

That produced this commit:
scientific-python/specs@6a05b23

@jarrodmillman jarrodmillman merged commit fb81b5f into scikit-image:main Sep 28, 2023
22 checks passed
@stefanv stefanv added this to the 0.22 milestone Sep 28, 2023
@lagru
Copy link
Member

lagru commented Sep 28, 2023

That UX seems really cool. 🚀 Thanks for taking the time to answer. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 type: Maintenance Refactoring and maintenance of internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants