pre-commit-ci / issues

public issues for https://pre-commit.ci
16 stars 3 forks source link

Autofix not commiting to branch #101

Closed npitsillos closed 2 years ago

npitsillos commented 2 years ago

Hello and thank you for such an amazing tool! Recently I have witness some strange behaviour where when a check fails and files are changed pre-commit does not update the files automatically. Here is an example of my yaml file

repos:
-   repo: https://github.com/psf/black
    rev: 21.11b1
    hooks:
    - id: black
      language_version: python3.7
-   repo: https://github.com/PyCQA/flake8
    rev: 4.0.1
    hooks:
    -   id: flake8
        additional_dependencies: [flake8-typing-imports==1.7.0]

Here you can see how the check has failed. image

Here is the pre-commit output. image

Before I changed some github actions this was working fine but as soon as I removed some actions this started to break. How would I go about resolving this?

asottile commented 2 years ago

in the future please link either the PR or the run, that's the most important piece of information for debugging this

it seems you've misconfigured branch protection to apply to all branches in your repository and so you cannot push to any branch

npitsillos commented 2 years ago

I am sorry here is the PR link https://github.com/npitsillos/talos/pull/16. To be honest I believe I had that before but maybe I overlooked something.

Thakk you very much I will try this and let you know.

npitsillos commented 2 years ago

in the future please link either the PR or the run, that's the most important piece of information for debugging this

it seems you've misconfigured branch protection to apply to all branches in your repository and so you cannot push to any branch

This has solved my problem thank you! I didn't realise this might be the case.