-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add types on generator-cicd #28427
base: main
Are you sure you want to change the base?
Add types on generator-cicd #28427
Conversation
Hi, Can this code get a review? It aligns the cicd generator with the new 'command' approach. So that I can move on to the next generator... |
"ciCdAny": false, | ||
"ciCdAzure": false, | ||
"ciCdCircle": false, | ||
"ciCdGithub": false, |
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.
Should Hub be capitalized like it is in GitHub?
"ciCdIntegrationsSnyk": false, | ||
"ciCdIntegrationsSonar": false, | ||
"ciCdJenkins": false, | ||
"ciCdTravis": false, |
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.
Is Travis still being used by developers?
@@ -835,6 +859,9 @@ exports[`generator - app with default config should match snapshot 1`] = ` | |||
"skipJhipsterDependencies": undefined, | |||
"skipServer": undefined, | |||
"skipUserManagement": false, | |||
"sonarName": undefined, | |||
"sonarOrga": undefined, |
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.
Should this be sonarOrg
?
@@ -41,13 +49,16 @@ const command: JHipsterCommandDefinition = { | |||
{ name: 'Travis CI', value: 'travis' }, | |||
{ name: 'CircleCI', value: 'circle' }, | |||
], | |||
scope: 'context', | |||
scope: 'storage', |
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.
Why did the scope value change?
}, | ||
default: 'snapshots', | ||
scope: 'context', | ||
default: 'snapshots', |
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.
Is there a formatting issue here?
type: String, | ||
}, | ||
prompt: gen => ({ | ||
when: answers => answers.ciCd?.includes('jenkins') && answers.ciCdIntegrations?.includes('sonar'), |
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.
There's a warning above.
).length !== this.jhipsterConfig.ciCd.length | ||
) { | ||
throw new Error( | ||
`error: command-argument value '${this.jhipsterConfig.ciCd}' is invalid for argument 'ciCd'. Allowed choices are github, jenkins, gitlab, azure, travis, circle.`, |
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.
I don't know if "command-argument value" would make sense to me in an error message.
Add types on generator-cicd
Contributes to #28235
Please make sure the below checklist is followed for Pull Requests.
When you are still working on the PR, consider converting it to Draft (below reviewers) and adding
skip-ci
label, you can still see CI build result at your branch.