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

pre-commit: fix deprecated stages #1029

Merged
merged 2 commits into from
Dec 6, 2024
Merged

Conversation

Crocmagnon
Copy link
Contributor

@Crocmagnon Crocmagnon commented Dec 5, 2024

Context

Fix deprecated pre-commit stages.
Fix #980

Validation

  • Create a minimal pre-commit config (see below)
  • Run pre-commit run --all-files
  • No warning should appear.

Minimal config:

repos:
  - repo: https://github.com/gitguardian/ggshield
    rev: v1.34.0 # update this version
    hooks:
      - id: ggshield

PR check list

  • As much as possible, the changes include tests (unit and/or functional)
  • If the changes affect the end user (new feature, behavior change, bug fix) then the PR has a changelog entry (see doc/dev/getting-started.md). If the changes do not affect the end user, then the skip-changelog label has been added to the PR.

❓ Does this require a changelog entry? I'd be tempted to say no but I don't know your policies.

@Crocmagnon Crocmagnon requested a review from a team as a code owner December 5, 2024 00:06
@Crocmagnon Crocmagnon mentioned this pull request Dec 5, 2024
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.03%. Comparing base (ee56436) to head (1558993).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1029   +/-   ##
=======================================
  Coverage   92.03%   92.03%           
=======================================
  Files         181      181           
  Lines        7708     7708           
=======================================
  Hits         7094     7094           
  Misses        614      614           
Flag Coverage Δ
unittests 92.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sevbch
Copy link
Contributor

sevbch commented Dec 5, 2024

Hi @Crocmagnon ,
Thank you for this PR. To reproduce the validation case, could tell which version of pre-commit you're using?
Thanks!

@Crocmagnon
Copy link
Contributor Author

version 4.0.1

Copy link
Collaborator

@agateau-gg agateau-gg left a comment

Choose a reason for hiding this comment

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

Thanks! I finally managed to reproduce and I can confirm your changes fit the warning.

Looking at a similar fix done by the pre-commit authors themselves, it looks like it is recommended to add a minimum_pre_commit_version: 3.2.0 entry for each hook. Can you look into this?

@Crocmagnon Crocmagnon requested a review from agateau-gg December 6, 2024 16:43
Copy link
Collaborator

@agateau-gg agateau-gg left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@agateau-gg agateau-gg enabled auto-merge December 6, 2024 17:16
@agateau-gg agateau-gg merged commit 4479d68 into GitGuardian:main Dec 6, 2024
33 checks passed
@Crocmagnon Crocmagnon deleted the patch-1 branch December 6, 2024 17:23
@Crocmagnon
Copy link
Contributor Author

Thank you for your quick feedback! :)

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

Successfully merging this pull request may close these issues.

pre-commit warning
3 participants