Coder Social home page Coder Social logo

Comments (20)

nvuillam avatar nvuillam commented on June 6, 2024 1

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.

nvuillam avatar nvuillam commented on June 6, 2024 1

@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.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024 1
Screenshot 2024-03-11 at 10 47 34 AM That worked

from megalinter.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024

@nvuillam Can you give some insights on this ?

from megalinter.

nvuillam avatar nvuillam commented on June 6, 2024

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.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024

@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.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024

Screenshot 2024-03-04 at 11 11 32 AM
Screenshot 2024-03-04 at 11 38 04 AM

for example

from megalinter.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024

@nvuillam does that give some context ?

from megalinter.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024

And the without token it fails
Screenshot 2024-03-04 at 11 50 09 PM

from megalinter.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024

https://github.com/oxsecurity/megalinter/blob/main/megalinter/config.py#L112 this might not work for enterprise orgs with sso

from megalinter.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024

https://github.com/orgs/community/discussions/24744 ref

from megalinter.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024

@nvuillam Can you share some insights here ?

from megalinter.

nvuillam avatar nvuillam commented on June 6, 2024

@bheemvennapureddy I'm afraid it just works with public hosted files :/

a simple http request is used to get remote YML content

image

Would it help if you could define some variables with credentials that would be sent as query params or Auth headers ?

from megalinter.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024

@nvuillam Can we use the GITHUB_TOKEN passed on the ENV ?

from megalinter.

nvuillam avatar nvuillam commented on June 6, 2024

Would it work ?
Can you try with some PAT with postman ?
If it worked yes i can make an enhancement :)

from megalinter.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024

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.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024

@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.

bheemvennapureddy avatar bheemvennapureddy commented on June 6, 2024

@nvuillam why don't we use something like this ? https://github.com/probot/octokit-plugin-config#the-_extends-key

from megalinter.

nvuillam avatar nvuillam commented on June 6, 2024

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.

nvuillam avatar nvuillam commented on June 6, 2024

@bheemvennapureddy great, thanks for the feedback :)

Note: the update is now available in latest release 7.10.0 :)

from megalinter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.