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.
![Screenshot 2024-03-11 at 10 47 34 AM](https://private-user-images.githubusercontent.com/144472943/311768380-d1b7372c-ac25-4773-b4b4-ead13afb04a4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc2NzQ1NzQsIm5iZiI6MTcxNzY3NDI3NCwicGF0aCI6Ii8xNDQ0NzI5NDMvMzExNzY4MzgwLWQxYjczNzJjLWFjMjUtNDc3My1iNGI0LWVhZDEzYWZiMDRhNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYwNlQxMTQ0MzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jYzQ3NTM1YzMwOGUxNGMyMTNjNmExZTk2NTBhOTY5MThmNGY1YWQ0OGQ3ZGRhMjk5ZTJjNDljNzE3N2M4YTM4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.ShrlOyRUPMN2qIDh8-Bs2JXcDfJO1EydnixSWg7m1gw)
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)
- Is option `-p` in mega-linter-runner working properly? HOT 1
- Specify Configuration File for CSharpier Linter HOT 2
- Tekton integration HOT 4
- Issue in setting custom configuration files HOT 1
- Request new MegaLinter flavor HOT 1
- MegaLinter Azure DevOps Extension/Task HOT 6
- Unable to use ESLint flat config for linting JavaScript HOT 13
- Biome support HOT 3
- Update version of tflint-ruleset-aws HOT 3
- Doesn't seem to use LINTER_RULES_PATH in WSL HOT 4
- How does one configure Detekt? HOT 11
- Powershell installed twice HOT 3
- TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension On Install HOT 2
- ENABLE_ERRORS_LINTERS HOT 3
- Powershell error table formatting issue HOT 1
- Devskim config ignored instead crawl-archives enabled by default HOT 1
- VSCODE error HOT 2
- Can EXTENDS be set in env? HOT 2
- TFLint - deprecated argument in ".tflint.hcl" HOT 6
- Action "Auto-Update Linters" is failing HOT 19
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.