Comments (20)
Got it :)
I'll make the update when i find time, soon i hope :)
If you are in a hurry you can also submit a PR ^^
from megalinter.
@bheemvennapureddy please can you try again with beta version ?
GITHUB_TOKEN will be sent as header to get the url defined in your EXTENDS property, as in your curl example :)
from megalinter.
from megalinter.
@nvuillam Can you give some insights on this ?
from megalinter.
Yes you can use EXTENDS using a remote .mega-linter.yml :)
for example:
# Extend from shared sfdx-hardis Mega-Linter configuration :)
EXTENDS:
- https://raw.githubusercontent.com/hardisgroupcom/sfdx-hardis/main/config/sfdx-hardis.mega-linter-config.yml
DISABLE_ERRORS_LINTERS:
- CSS_STYLELINT
- MARKDOWN_MARKDOWN_LINK_CHECK
- SALESFORCE_LIGHTNING_FLOW_SCANNER
- YAML_YAMLLINT
from megalinter.
@nvuillam Can we use yml directly rather than use the raw content with enterprise raw content only works with tokens and those tokens expire
from megalinter.
for example
from megalinter.
@nvuillam does that give some context ?
from megalinter.
And the without token it fails
from megalinter.
https://github.com/oxsecurity/megalinter/blob/main/megalinter/config.py#L112 this might not work for enterprise orgs with sso
from megalinter.
https://github.com/orgs/community/discussions/24744 ref
from megalinter.
@nvuillam Can you share some insights here ?
from megalinter.
@bheemvennapureddy I'm afraid it just works with public hosted files :/
a simple http request is used to get remote YML content
Would it help if you could define some variables with credentials that would be sent as query params or Auth headers ?
from megalinter.
@nvuillam Can we use the GITHUB_TOKEN passed on the ENV ?
from megalinter.
Would it work ?
Can you try with some PAT with postman ?
If it worked yes i can make an enhancement :)
from megalinter.
We are using a Github App Auth token when gets generated during the build before running megalinter which should be able to access files across org which is what we are doing with https://github.com/release-drafter/release-drafter
from megalinter.
@nvuillam this worked for me
curl -X GET -H "Authorization: token $GITHUB_PAT_TOKEN" https://raw.githubusercontent.com/MyOrg/MyPrivateRepo/HEAD/file.yaml
<content of file.yaml>
from megalinter.
@nvuillam why don't we use something like this ? https://github.com/probot/octokit-plugin-config#the-_extends-key
from megalinter.
Because we didn't think about that when implementing EXTENDS property management :)
I'll make a PR to handle the github token sent as header :)
from megalinter.
@bheemvennapureddy great, thanks for the feedback :)
Note: the update is now available in latest release 7.10.0 :)
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 5
- 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
- `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.