Skip to content
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

perf(apikey): add question model for api key #10267

Merged
merged 4 commits into from
Nov 3, 2023

Conversation

KennethBWSong
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Merging #10267 (b0a27b9) into dev (f2cdce7) will increase coverage by 0.04%.
Report is 16 commits behind head on dev.
The diff coverage is 86.20%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #10267      +/-   ##
==========================================
+ Coverage   86.15%   86.20%   +0.04%     
==========================================
  Files         442      442              
  Lines       25516    25555      +39     
  Branches     5009     5016       +7     
==========================================
+ Hits        21984    22030      +46     
+ Misses       1837     1831       -6     
+ Partials     1695     1694       -1     
Files Coverage Δ
...ages/fx-core/src/component/driver/apiKey/create.ts 85.71% <100.00%> (+0.96%) ⬆️
...ges/fx-core/src/component/middleware/questionMW.ts 100.00% <100.00%> (ø)
packages/fx-core/src/question/index.ts 94.44% <100.00%> (+0.32%) ⬆️
packages/fx-core/src/question/questionNames.ts 100.00% <100.00%> (ø)
packages/fx-core/src/question/other.ts 84.49% <73.33%> (-0.56%) ⬇️

... and 7 files with indirect coverage changes

@@ -7,9 +7,12 @@ import { TOOLS } from "../../core/globalVars";
import { QuestionNodes, questionNodes } from "../../question";
import { traverse } from "../../ui/visitor";

export function QuestionMW(key: keyof QuestionNodes): Middleware {
export function QuestionMW(key: keyof QuestionNodes, fromAction = false): Middleware {
return async (ctx: HookContext, next: NextFunction) => {
const inputs = ctx.arguments[0] as Inputs;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if fromAction is true, the inputs here is DriverContext, is there any issue if we use it as Inputs type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems no error when building and running. Do you think we need to mock an input and set platform, xxx into it?

SLdragon
SLdragon previously approved these changes Nov 2, 2023
jayzhang
jayzhang previously approved these changes Nov 3, 2023
sffamily
sffamily previously approved these changes Nov 3, 2023
@@ -293,6 +293,8 @@
"core.createProjectQuestion.apiSpecInputUrl.label": "Enter OpenAPI Description Document Location",
"core.createProjectQuestion.OpenAIPluginDomain": "OpenAI Plugin Manifest",
"core.createProjectQuestion.OpenAIPluginDomain.placeholder": "Enter your website domain or manifest URL",
"core.createaProjectQuestion.ApiKey": "Client secret for Api key in OpenAPI spec",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Api -> API
spec -> specification

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, thanks!

@@ -293,6 +293,8 @@
"core.createProjectQuestion.apiSpecInputUrl.label": "Enter OpenAPI Description Document Location",
"core.createProjectQuestion.OpenAIPluginDomain": "OpenAI Plugin Manifest",
"core.createProjectQuestion.OpenAIPluginDomain.placeholder": "Enter your website domain or manifest URL",
"core.createaProjectQuestion.ApiKey": "Client secret for Api key in OpenAPI spec",
"core.createProjectQuestion.invalidApiKey.message": "Client secret is invalid. Length of secret should >= 10 and <= 128",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Length -> The length
should -> should be

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, thanks!

Copy link
Collaborator

@sffamily sffamily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revoke approval, ask for changes

@sffamily sffamily dismissed their stale review November 3, 2023 02:09

see comments

@KennethBWSong KennethBWSong dismissed stale reviews from jayzhang and SLdragon via 1537716 November 3, 2023 04:01
@KennethBWSong KennethBWSong merged commit ac51cf0 into dev Nov 3, 2023
19 checks passed
@KennethBWSong KennethBWSong deleted the bowsong/api_key_question branch November 3, 2023 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants