Skip to content

feat(ci): switch to pre-commit.ci for code quality#4750

Merged
neersighted merged 7 commits into
masterfrom
neersighted/pre-commit.ci
Nov 14, 2021
Merged

feat(ci): switch to pre-commit.ci for code quality#4750
neersighted merged 7 commits into
masterfrom
neersighted/pre-commit.ci

Conversation

@neersighted
Copy link
Copy Markdown
Member

@neersighted neersighted commented Nov 13, 2021

pre-commit.ci is faster, and has less moving parts than our current Github Actions workflow. It integrates with Github checks, it can auto-correct PRs if desired (turned off in this PR), and it will automatically generate PRs to keep our pre-commit hooks up to date.

Note that this PR won't actually show pre-commit.ci working until an organization admin enables it (additionally, the protected branch config will have to be updated).

@neersighted neersighted reopened this Nov 13, 2021
Comment thread .pre-commit-config.yaml Outdated
Comment thread .pre-commit-config.yaml
Comment thread .pre-commit-config.yaml Outdated
Comment thread .pre-commit-config.yaml Outdated
Comment thread pyproject.toml
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml
Comment thread pyproject.toml
Comment thread pyproject.toml
@neersighted
Copy link
Copy Markdown
Member Author

neersighted commented Nov 14, 2021

Incidentally, it looks like pre-commit.ci is going to run against all future PR pulls. To avoid unwanted auto-fix commits as much as possible, I can create a reduced subset of this that just disables the auto-fix commits until the larger PR can be merged.

image

(screenshot from an unrelated PR)

@neersighted neersighted force-pushed the neersighted/pre-commit.ci branch 3 times, most recently from 29d2027 to 15bf937 Compare November 14, 2021 00:15
@neersighted neersighted added the area/ci Related to CI/CD label Nov 14, 2021
Comment thread pyproject.toml Outdated
Comment thread .pre-commit-config.yaml
@neersighted neersighted force-pushed the neersighted/pre-commit.ci branch 2 times, most recently from 1ef1b6d to 3a695eb Compare November 14, 2021 15:09
@neersighted
Copy link
Copy Markdown
Member Author

Fixed the failing checks by making the old code-quality workflow a no-op.

Copy link
Copy Markdown
Member

@abn abn left a comment

Choose a reason for hiding this comment

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

Changes look good to me. I'd request that we remove the commented out checks for now and enable them as and when we need them.

Comment thread .pre-commit-config.yaml Outdated
@neersighted
Copy link
Copy Markdown
Member Author

Changes look good to me. I'd request that we remove the commented out checks for now and enable them as and when we need them.

Done!

@neersighted neersighted force-pushed the neersighted/pre-commit.ci branch from cfccf78 to 1eb356d Compare November 14, 2021 18:39
@neersighted neersighted requested a review from abn November 14, 2021 19:08
code-quality.yaml / the `pre-commit` workflow are made a no-op to smooth
the transition.
@neersighted neersighted force-pushed the neersighted/pre-commit.ci branch from 1eb356d to 2c83315 Compare November 14, 2021 19:12
@neersighted neersighted force-pushed the neersighted/pre-commit.ci branch from 2c83315 to 9e8c88a Compare November 14, 2021 19:35
Comment thread tests/repositories/fixtures/pypi.org/json/clikit.json Outdated
@neersighted neersighted force-pushed the neersighted/pre-commit.ci branch from 13719c9 to 0a5d7e5 Compare November 14, 2021 20:12
@neersighted neersighted force-pushed the neersighted/pre-commit.ci branch from 0a5d7e5 to b9fc2b1 Compare November 14, 2021 20:16
@neersighted neersighted requested a review from abn November 14, 2021 20:57
@neersighted neersighted merged commit f7bbd54 into master Nov 14, 2021
@neersighted neersighted deleted the neersighted/pre-commit.ci branch November 14, 2021 21:17
@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/ci Related to CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants