Comments (16)
the "push back" behaviour is only enabled for pull requests, not pushes directly to breanches
from action.
Sorry, copied that incorrectly, it's launched on pull_request
.
from action.
Apologies about that, I copied the old file, the correct formatting was:
name: pre-commit
on:
pull_request:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- uses: pre-commit/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
from action.
is the pull request from a fork maybe?
from action.
No, everything belongs to me.
from action.
The repo belongs to an organisation that I belong to, could that be the problem?
from action.
can you show me a screenshot of the title portion of the PR? it should show where the branch is coming from and going to and that will help me debug
from that configuration, the only explanation that I have is that secrets are not enabled because it is an outside pull request (even if you own both of the repositories) -- github will only give secrets to PRs coming from the repository itself
from action.
I think somehow the fact that this is not a pull request is not correctly sent to the action but not sure how to correct that.
from action.
ah actually I think I know what's happening here
if pre-commit fails on the second invocation it can't push to the branch because github actions does not fire on pushes made by github actions -- so instead it marks the job as failed
I notice you also have both double-quote-string-fixer
and black
-- the two tools disagree on formatting of strings unless you pass -S
(skip-string-normalization) to black and so your job will always fail
from action.
Yes, that's it, thank you!!! I was racking my brain...
It's not fully working, now it's failing with
! [remote rejected] HEAD -> test-2 (refusing to allow a GitHub App to create or update workflow `.github/workflows/pre-commit.yml` without `workflows` permission)
since it also updates the workflow file but I'll try to exclude that file and then it should work.
Thanks again for the help and the tool!
from action.
ah yeah, I've run into that too, I actually don't know any solutions to that via github actions -- it'll work with https://pre-commit.ci though (coming soon!)
from action.
Is there any way I can tell pre-commit to ignore files or should I try to do that in the action?
That CI looks awesome though, seriously helpful!
from action.
either top level exclude
or hook level exclude
from action.
Awesome, thank you!
from action.
Would you mind if I would include that in the readme of this project?
Seems like something that others might face as well.
from action.
sure
from action.
Related Issues (20)
- Positional-only parameters are only supported in Python 3.8 and greater HOT 3
- Please fix "save-state" warning (by updating actions/core?) HOT 1
- How to fix atal: could not read Username HOT 2
- Is this action still DEPRECATED? HOT 1
- v3.0.0 does not work HOT 1
- Rename component dir: predictions_to_biquery -> predictions_to_bigquery HOT 1
- Caching the pre-commit envs HOT 2
- Use of pre-commit.ci with dependencies HOT 1
- hook id: check-github-workflows is failing on "run-name:" validation HOT 1
- pre-commit/[email protected] Depends on actions/cache@v3 which is using Node 16 which is now deprecated HOT 4
- Error: Process completed with exit code 1. HOT 3
- Tagging versions HOT 1
- Disabling hooks by id HOT 2
- Action version updates - not duplicate HOT 5
- Node.js 16 actions are deprecated. HOT 1
- GHES Support HOT 1
- Deprecation of types-pkg-resources causes pre-commit to fail in pre-commit/[email protected] HOT 4
- Caching - packages are not restored properly HOT 1
- Caching - packages are not restored properly HOT 2
- Running this action in a specific directory? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action.