Skip to content

Commit 3819c45

Browse files
committed
feat: add param force abort for pre and post cd
1 parent 71a643f commit 3819c45

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Shared/Components/CICDHistory/TriggerDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const ProgressingStatus = memo(({ stage, type, label = 'In progress' }: Progress
119119
if (type === HistoryComponentType.CI) {
120120
abort = (isForceAbort: boolean) => cancelCiTrigger({ pipelineId, workflowId: buildId }, isForceAbort)
121121
} else if (stage !== DeploymentStageType.DEPLOY) {
122-
abort = () => cancelPrePostCdTrigger(pipelineId, triggerId)
122+
abort = (isForceAbort: boolean) => cancelPrePostCdTrigger(pipelineId, triggerId, isForceAbort)
123123
}
124124

125125
async function abortRunning() {

src/Shared/Components/CICDHistory/service.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ export const cancelCiTrigger = (params, isForceAbort) => {
7474
return trash(URL)
7575
}
7676

77-
export const cancelPrePostCdTrigger = (pipelineId, workflowRunner) => {
78-
const URL = `${ROUTES.CD_MATERIAL_GET}/${pipelineId}/workflowRunner/${workflowRunner}`
77+
export const cancelPrePostCdTrigger = (pipelineId, workflowRunner, isForceAbort: boolean) => {
78+
const URL = getUrlWithSearchParams(`${ROUTES.CD_MATERIAL_GET}/${pipelineId}/workflowRunner/${workflowRunner}`, {
79+
forceAbort: isForceAbort,
80+
})
7981
return trash(URL)
8082
}
8183

0 commit comments

Comments
 (0)