Skip to content

Run pre-commit in GitHub Actions #661

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Jul 25, 2025

@Copilot Copilot AI review requested due to automatic review settings July 25, 2025 21:28
@cclauss cclauss requested a review from amilcarlucas as a code owner July 25, 2025 21:28
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR integrates pre-commit hooks into the GitHub Actions CI pipeline by adding a new job to the existing codespell workflow. This ensures that all pre-commit checks (linting, formatting, type checking) run automatically on pull requests and pushes.

  • Adds a pre-commit job to the codespell workflow
  • Includes security hardening with step-security/harden-runner
  • Uses the official pre-commit GitHub Action
Comments suppressed due to low confidence (1)

.github/workflows/codespell.yml:25

  • The version v3.0.1 of pre-commit/action does not exist. The latest available version is v3.0.0. Please update to use @v3.0.0 or use a commit hash for better security.
        uses: pre-commit/action@v3.0.1

@amilcarlucas
Copy link
Collaborator

Can you move this to a new action called pre-commit.yml and run https://pre-commit.ci/ instead?

@cclauss cclauss force-pushed the pre-commit-in-github-actions branch 3 times, most recently from ac7e5b2 to 540f0f0 Compare July 25, 2025 22:02
@cclauss
Copy link
Contributor Author

cclauss commented Jul 25, 2025

If you just turn on pre-commit.ci then we can close this PR and delete codespell.yml and several other GHAs.

@cclauss cclauss force-pushed the pre-commit-in-github-actions branch from 540f0f0 to c62620b Compare July 25, 2025 22:08
@cclauss cclauss force-pushed the pre-commit-in-github-actions branch from c62620b to 3771c48 Compare July 25, 2025 22:14
@cclauss
Copy link
Contributor Author

cclauss commented Jul 25, 2025

https://pre-commit.ci needs to me turned on by a maintainer. I do not have access rights to do so.

@amilcarlucas
Copy link
Collaborator

Thanks for looking into this.
I'll add it on Monday

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

Successfully merging this pull request may close these issues.

2 participants