Skip to content

Commit

Permalink
fix: Fix parameters defined in pipeline not passed to jenkins (#4217)
Browse files Browse the repository at this point in the history
fix: fix parameters defined in pipeline not passed to jenkins

Signed-off-by: yazhou <[email protected]>
  • Loading branch information
yazhouio authored Oct 23, 2023
1 parent bb10df0 commit ab1c1c9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/Forms/Pipelines/ParamsFormModal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ export default class ParamsFormModal extends React.Component {
const { parameters, currentBranch } = this.state

this.formRef.current.validate(() => {
if (!isEmpty(formParameters) && formParameters.__branch) {
formParameters.branch = formParameters.__branch
delete formParameters.__branch
}
const params = isEmpty(formParameters)
? !isEmpty(parameters) && Array.isArray(parameters)
? parameters.map(item => ({
Expand Down Expand Up @@ -171,7 +175,10 @@ export default class ParamsFormModal extends React.Component {
label={param.name}
desc={param.description}
>
<Input defaultValue={defaultValue} name={param.name} />
<Input
defaultValue={defaultValue}
name={param.name === 'branch' ? '__branch' : param.name}
/>
</Form.Item>
)
case 'text':
Expand Down

0 comments on commit ab1c1c9

Please sign in to comment.