Skip to content

Commit c1c0ced

Browse files
pratap0007vikram-raj
authored andcommitted
Fix manual approval gate pipelinerun UI filer
This patch fixes any partially approved pipelinerun to show in the pending category of manual approval gate pipelinerun UI filter Signed-off-by: Shiv Verma <[email protected]>
1 parent bde377e commit c1c0ced

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/approval-tasks/ApprovalTasksList.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ type ApprovalTasksListProps = {
2727

2828
const pipelineApprovalFilterReducer = (obj: ApprovalTaskKind, pipelineRuns) => {
2929
const pipelineRun = getPipelineRunOfApprovalTask(pipelineRuns, obj);
30-
return getApprovalStatus(obj, pipelineRun) || ApprovalStatus.Unknown;
30+
const status = getApprovalStatus(obj, pipelineRun);
31+
if (
32+
status === ApprovalStatus.PartiallyApproved ||
33+
status === ApprovalStatus.AlmostApproved
34+
) {
35+
return ApprovalStatus.RequestSent;
36+
}
37+
return status || ApprovalStatus.Unknown;
3138
};
3239

3340
const ApprovalTasksList: React.FC<ApprovalTasksListProps> = ({

0 commit comments

Comments
 (0)