Fix code formatting github action
See original GitHub issue🐛 Bug description
Currently, auto code formatting GA: https://github.com/pytorch/ignite/actions/workflows/code-style.yml does not on forks and fails while try to commit/push the fix to the fork. This gives a misleading error to the user without helping how to solve it. Currently this action is disabled.
The idea is to find out what is the cause of the failure and fix it if possible.
Environment
- PyTorch Version (e.g., 1.4):
- Ignite Version (e.g., 0.3.0):
- OS (e.g., Linux):
- How you installed Ignite (
conda
,pip
, source): - Python version:
- Any other relevant information:
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (2 by maintainers)
Top Results From Across the Web
GitHub Actions: How to Automate Code Formatting in Pull ...
How to automatically format code and push it to the pull request branch with GitHub Actions.
Read more >Prettier Action · Actions · GitHub Marketplace
GitHub Prettier Action. CodeFactor code style: prettier License MIT Latest Release Contributors Issues. A GitHub action for styling files with prettier.
Read more >Marketplace Actions Run black formatter - GitHub
This action runs the black formatter to check/format your python code on a push or pull request. It is similar to reviewdog/action-black that...
Read more >Black Code Formatter · Actions · GitHub Marketplace
Black Code Formatter GitHub Action. A GitHub action that runs black code formatter for Python. Example Workflow. workflow "Example Workflow" { on =...
Read more >Node Code Formatter - GitHub Action
Usage ✏️ · Create a formatter.yml file in .github/workflows/ · Paste this code into the file:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the info and the link. Shouldn’t we do like in the example: https://github.com/stefanzweifel/git-auto-commit-action#example-2 but adapted for us :
We can inspect what happens in both cases: a) GitHub Action is enabled on the forked repository. b) GitHub Action is disabled on the forked repository.
@vfdev-5 After quick view at the
stefanzweifel/git-auto-commit-action@v4
I found this recomendation:You must use action/checkout@v2 or later versions to checkout the repository. In non-push events, such as pull_request, make sure to specify the ref to checkout:
And, also, there is a recipe how to use it with forks:
https://github.com/stefanzweifel/git-auto-commit-action#using-the-action-in-forks-from-public-repositories
And this: