twisted / towncrier

Manage the release notes for your project.

Home Page:https://towncrier.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pre-commit autoupdate seems to fail

HealthyPear opened this issue · comments

When I launch pre-commit autoupdate I get this

$ pre-commit autoupdate
[https://github.com/pre-commit/pre-commit-hooks] already up to date!
[https://github.com/psf/black-pre-commit-mirror] already up to date!
[https://github.com/adamchainz/blacken-docs] already up to date!
[https://github.com/rstcheck/rstcheck] already up to date!
[https://github.com/charliermarsh/ruff-pre-commit] already up to date!
[https://github.com/nbQA-dev/nbQA] already up to date!
[https://github.com/twisted/towncrier]
=====> /var/folders/2z/142033n17rbfy969s6h4hymw0000gn/T/tmphs0r_674/.pre-commit-hooks.yaml is not a file

So all other git hooks get updated, but it crashes only when trying to update this project.

I also tried to manually update the config file with what I see from your docs,

  - repo: https://github.com/twisted/towncrier
    rev: 22.13.0
    hooks:
      - id: towncrier-check

but the result doesn't change.

Also pre-commit clean doesn't seem to help.

Thanks for the report

I see that pre-commit support was added here #499

I am not very familiar with pre-commit internals.

Can you please provide a self contained example so that I can reproduce this error?

I think the minimal example is to use what it proposed in the docs, so a .pre-commit-config file with just

  - repo: https://github.com/twisted/towncrier
    rev: 22.13.0
    hooks:
      - id: towncrier-check

It is worth noting that this happened from one day to another; it is not the first time I use towncrier with pre-commit

I was not able to reproduce see the change from #572 and the result https://results.pre-commit.ci/run/github/48647797/1703077437.QjeBDGruRIWq9RS5mZgEHg

I see that in there you test only for the direct installation, you are not using autoupdate - perhaps only that causes a problem?

I can install the git hook, what fails is the update

Thanks for the info.
As commented. I'm not very familiar with pre-commit.
This is why I was asking for the steps to reproduce this... for dummies :)

I think I got this. I was able to reproduce the error and I have pushed the steps to the PR.

Not sure what is going in there.

I will not have much time to investigate this.

My main concern was why our automated tests pass, while people are getting errors.

I am happy to review a fix for this.

Regards