Skip to content

Let hook authors define branch to update from #2508

@finswimmer

Description

@finswimmer

Hey,

at the moment pre-commit autoupdate looks for the most recent tag in the default branch of the repository. This works well, for repository where new releases are tagged in the default branch.

I common branching strategy is, that the default branch is the active development branch, commits get backported to stable release branches and new releases are tagged in this stable release branches. At the moment pre-commit is unable to find the most recent release, due to tags are not given in the main branch.

This is why I suggest a new option, that hooks authors can put into their .pre-commit-hooks.yaml in the default branch, for defining a branch in which pre-commit autoupdate should look for the most recent tag.

Something similar is done by renovate with the baseBranches option.

Thanks a lot.

fin swimmer

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions