Skip to content

pre-commit: tag prefixes are not matched #14550

@henryiii

Description

@henryiii

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

pre-commit

Package manager version

No response

Language version

No response

Manifest location and content before the Dependabot update

https://github.com/pypa/packaging/blob/main/.pre-commit-config.yaml

dependabot.yml content

https://github.com/pypa/packaging/blob/main/.github/dependabot.yml

Updated dependency

Moving https://github.com/crate-ci/typos from tag v1.44.0 to version 5.0.6 (actually tag varcon-core-v5.0.6)

What you expected to see, versus what you actually saw

I'd expect the tag to be preserved, vX.Y.Z should update to a similar tag, not one with a different prefix. This is also an older tag, though that might not always be the case.

Native package manager behavior

prek auto-update --frozen handles this correctly (prek is a Rust rewrite of pre-commit). The original pre-commit autoupdate --frozen also handles this better than Dependabot, though it can get confused and convert vX.Y.Z to vX. I think it's trying to get the latest tag.

Images of the diff or a link to the PR, issue, or logs

pypa/packaging#1136

Smallest manifest that reproduces the issue

repos:   
  - repo: https://github.com/crate-ci/typos
    rev: 631208b7aac2daa8b707f55e7331f9112b0e062d  # frozen: v1.44.0
    hooks:
      - id: typos
        args: []
version: 2
updates:
  - package-ecosystem: "pre-commit"
    directory: "/"
    schedule:
      interval: "monthly"
    cooldown:
      default-days: 7

(Last four lines might not be needed, actually)

Metadata

Metadata

Labels

T: bug 🐞Something isn't working

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions