Comments (4)
@andrewvaughan when such case happens, you can just download the job artifacts, then copy-paste content of folder "updated-sources" in your repo, then commit & push again: as the commit is from you and not from the workflow, it will pass :)
from megalinter.
@andrewvaughan when such case happens, you can just download the job artifacts, then copy-paste content of folder "updated-sources" in your repo, then commit & push again: as the commit is from you and not from the workflow, it will pass :)
I did something similar on my end - I just ran npx prettier -w .
on my end to fix things up and committed them myself.
Maybe the solution here, just to simplify things, would be to have a default configuration in that MegaLinter will not auto-fix anything in the workflows
folder, but simply add a warning annotation in the workflow for the user that it found something to fix, but wouldn't fix it? That will prevent the less-graceful failure state.
The solution I imagine is an extra workflow step, directly after auto-fix has been performed, but prior to adding/committing to the commit or new PR.
This step would see if there were any un-added modifications to the glob .github/workflow/*.yml
. If so, it would git checkout
those files to revert them back to the base SHA and then the Workflow can add a warning annotation to the run to let the user know "hey, there were some workflow files that need auto-correction, but we're gracefully refusing to do that because we need special permissions to modify other workflow files." A similar message could be added to the PR comment.
That way, everything else would auto-fix, and the user would get a nice, tidy warning about it. I think this would only be one extra step, maybe two, in the workflow file? But y'all may have a more graceful idea. Would love to hear your thoughts!
from megalinter.
@andrewvaughan your solution would work, but i'm afraid it would be a bit hammer for a little fly ^^
We would need to either add specific behavior on all linters that can impact yml, or to update the default workflow for all existing users...
That seems too big just for one use case, and it also would be opening the door to handle and maintain thousands of specific use cases ^^
But if you want to test the additional step just for documentation purpose , please be my guest :)
from megalinter.
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.
If you think this issue should stay open, please remove the O: stale π€
label or comment on the issue.
from megalinter.
Related Issues (20)
- Linter Pyright cannot import boto3 although I install it in PYTHON_PYRIGHT_PRE_COMMANDS HOT 4
- Possible futur issue with MarkdownLint HOT 4
- Proselint does not work as of 7.8.0 HOT 3
- Xmllint: also lint xsd files HOT 2
- Request new MegaLinter flavor HOT 1
- Semgrep status in documentation HOT 1
- Using apt-get in PRE_COMMANDS HOT 9
- Megalinter doesn't update the ts files with prettier ( doesn't format them ) HOT 5
- Request new MegaLinter flavor HOT 1
- Support AsyncAPI linting using Spectral HOT 7
- Explore installing Python with astral's `uv` HOT 6
- Kics incorrectly reporting the number of errors in summary HOT 2
- Line numbers reported by linters do not correspond to the committed files HOT 9
- Can we use _extends from another repo in same org HOT 20
- `SPELL_VALE_CONFIG_FILE` not working HOT 7
- APPLY_FIX related steps are not executing HOT 7
- βenv VALIDATE_ALL_CODEBASE=false does not work in docker HOT 12
- Megalinter is very slow HOT 11
- Typescript with invalid interface loaded as resolver HOT 4
- ANSIBLE_LINT enablement in Megalinter configurations is not checking the ansible yaml validations. HOT 11
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 megalinter.