feat: Git optional in CI job pipeline#1505
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
Coverage report❌ An unexpected error occurred. For more details, check console
Test suite run failedFailed tests: 17/141. Failed suites: 9/41.Report generated by 🧪jest coverage report action from 810aefa |
| tagsEditable: boolean | ||
| hideImageTaggingHardDelete: boolean | ||
| fetchIdData: FetchIdDataStatus | ||
| pipeline:CIPipeline |
There was a problem hiding this comment.
Please format this line
| primaryBranchAfterRegex: ciMaterial?.source?.value, | ||
| cipipelineId: ciMaterial?.id, | ||
| isJobCI: ciPipeline?.pipelineType === CIPipelineBuildType.CI_JOB | ||
| isJobCI: ciPipeline?.pipelineType === CIPipelineBuildType.CI_JOB, |
There was a problem hiding this comment.
We can remove the optional check
| return _nodes.map((node: NodeAttr) => { | ||
| if (node.type == WorkflowNodeType.GIT) { | ||
| return this.renderSourceNode(node, ci) | ||
| return ((node.isJobCI && node.isGitRequired) || !node.isJobCI) && this.renderSourceNode(node, ci) |
There was a problem hiding this comment.
We can write it as return (!node.isJobCI || node.isGitRequired) &&
| const _nodesData = this.getNodesData(ci?.id || webhook?.id || '') | ||
| const _nodes = _nodesData.nodes | ||
|
|
||
| const _nodes =this.getPositionedNodes( JSON.parse(JSON.stringify(_nodesData.nodes))) |
There was a problem hiding this comment.
Format this line. Why are we doing the stringify and parse here?
| handleOnBlur={handleOnBlur} | ||
| /> | ||
| {isJobCI && renderGitRepoToggle()} | ||
| {((isJobCI && isGitRequired) || !isJobCI) && ( |
There was a problem hiding this comment.
we can write it as {(!isJobCI || isGitRequired) && (
| <div className="w-32 h-20"> | ||
| <Toggle | ||
| selected={isGitRequired} | ||
| onSelect={() => { |
There was a problem hiding this comment.
Please extract this method out.
| false, | ||
| formData.webhookConditionList, | ||
| formData.ciPipelineSourceTypeOptions, | ||
|
|
There was a problem hiding this comment.
Please remove this unnecessary space








Description
This makes cloning and displaying git material based on user choice
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: