pre-commit-ci / issues

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

`pre-commit-ci/lite-action` isn't pushing changes #156

Closed deepyaman closed 1 year ago

deepyaman commented 1 year ago

Hi,

I'm trying the lite Action on a private repo.

It is creating an artifact:

image

The data.json contents look reasonable at a glance:

{"action_version":"v1.0.0","msg":"[pre-commit.ci lite] apply automatic fixes","base_tree":"64ce8fb13af0a2f133ae5053be3112659c41659b","delete":[],"binary":[],"text":[["firewood/firewood/cli/__init__.py","100644","\"\"\"The CLI module describes tools used to build the CLI for Firewood.\"\"\"\n__all__ = [\n    \"app\",\n]\n\nfrom .cli import app\n"]]}

I've added the follow tasks to my workflow:

       - uses: pre-commit/action@v3.0.0

       - uses: pre-commit-ci/lite-action@v1.0.0
         if: always()

I've also tried it withough pre-commit/action (should it still be used, since it's been deprecated for a while?), but it also didn't work:

       # code quality check
       - name: Run pre-commit on all files
         run: pre-commit run --all-files

       - uses: pre-commit-ci/lite-action@v1.0.0
         if: always()

Last but not least, I did make sure to install the GitHub Application for my repo, as instructed.

Any idea what's going wrong here?

asottile commented 1 year ago

private repos are a paid-only feature and not yet implemented

asottile commented 1 year ago

(your commit should have a status on it explaining that)

deepyaman commented 1 year ago

private repos are a paid-only feature and not yet implemented

@asottile I've used pre-commit.ci on personal, open source repos, but knew that it wasn't available for free for private repos. FWIW https://pre-commit.ci/lite.html was not clear enough for me, because I honestly got the impression that the lite version was a free (but limited functionality) alternative. It may be worth adding a clear notice on that page.

(your commit should have a status on it explaining that)

I can't find any such message.

On a somewhat related note, from https://github.com/pre-commit/action:

you can likely achieve the same thing with an external action such as git-auto-commit-action though you may want to take precautions to clear git hooks or other ways that arbitrary code execution can occur when running git commit / git push (for example core.fsmonitor).

while unrelated to this action, pre-commit.ci avoids these problems by installing and executing isolated from the short-lived repository-scoped installation access token.

Does pre-commit.ci lite also avoid these problems?

asottile commented 1 year ago

It may be worth adding a clear notice on that page.

yeah the lite.html will be updated when the paid tier is implemented -- it isn't yet though!

I can't find any such message.

oops, yeah looks like the message isn't in the released version:

    # TODO: pro tier
    if data['repository']['private']:
        # TODO: leave a status
        return

Does pre-commit.ci lite also avoid these problems?

yep!