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

Add types on generator-cicd #28427

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add types on generator-cicd #28427

wants to merge 2 commits into from

Conversation

Tcharl
Copy link
Contributor

@Tcharl Tcharl commented Jan 8, 2025

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.

@Tcharl Tcharl marked this pull request as ready for review January 8, 2025 19:15
@Tcharl
Copy link
Contributor Author

Tcharl commented Jan 28, 2025

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,
Copy link
Contributor

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,
Copy link
Contributor

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,
Copy link
Contributor

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',
Copy link
Contributor

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',
Copy link
Contributor

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'),
Copy link
Contributor

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.`,
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants