-
Notifications
You must be signed in to change notification settings - Fork 194
feat: implement scorecard-classic command #2433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: c182102 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
031a5a1 to
80fc819
Compare
packages/cli/src/commands/scorecard-classic/validation/plugin-evaluator.ts
Show resolved
Hide resolved
| ? await evaluatePluginsFromCode(pluginsCodeOrPlugins) | ||
| : pluginsCodeOrPlugins; | ||
|
|
||
| const config = await createConfig({ ...level, plugins } as RawUniversalConfig, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an open question.
So are we going to ignore local config in case when scorecards defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, i think, @tatomyr can suggest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, if scorecard is defined -- use it instead of the local config (for scorecards).
packages/cli/src/commands/scorecard-classic/remote/fetch-scorecard.ts
Outdated
Show resolved
Hide resolved
packages/cli/src/commands/scorecard-classic/remote/fetch-scorecard.ts
Outdated
Show resolved
Hide resolved
packages/cli/src/commands/scorecard-classic/formatters/json-formatter.ts
Outdated
Show resolved
Hide resolved
packages/cli/src/commands/scorecard-classic/auth/login-handler.ts
Outdated
Show resolved
Hide resolved
packages/cli/src/commands/scorecard-classic/auth/login-handler.ts
Outdated
Show resolved
Hide resolved
| export async function handleLoginAndFetchToken(config: Config): Promise<string | undefined> { | ||
| const reuniteUrl = getReuniteUrl(config, config.resolvedConfig?.residency); | ||
|
|
||
| const oauthClient = new RedoclyOAuthClient(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot we just re-use the login handler if the user is not authenticated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we cannot, because login handler doesn't check if we already store the credentials and they are exist.
What/Why/How?
scorecard-classic.Reference
Related: https://github.com/Redocly/redocly/issues/8775
Testing
Ran tests.
Screenshots (optional)
Check yourself
Security