mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 02:40:39 +09:00
fix execution policy decision persistence
This commit is contained in:
parent
a0333f3e9d
commit
bce58d353d
9 changed files with 160 additions and 34 deletions
|
|
@ -61,7 +61,7 @@ export function buildExecutionPolicy(input: {
|
|||
approverValues: string[];
|
||||
}): IssueExecutionPolicy | null {
|
||||
const mode = input.existingPolicy?.mode ?? "normal";
|
||||
const stages = [];
|
||||
const stages: IssueExecutionPolicy["stages"] = [];
|
||||
|
||||
const existingReviewStage = input.existingPolicy?.stages.find((stage) => stage.type === "review");
|
||||
const reviewParticipants = mergeParticipants(existingReviewStage?.participants, input.reviewerValues);
|
||||
|
|
@ -69,7 +69,7 @@ export function buildExecutionPolicy(input: {
|
|||
stages.push({
|
||||
id: existingReviewStage?.id ?? newId(),
|
||||
type: "review" as const,
|
||||
approvalsNeeded: 1,
|
||||
approvalsNeeded: 1 as const,
|
||||
participants: reviewParticipants,
|
||||
});
|
||||
}
|
||||
|
|
@ -80,7 +80,7 @@ export function buildExecutionPolicy(input: {
|
|||
stages.push({
|
||||
id: existingApprovalStage?.id ?? newId(),
|
||||
type: "approval" as const,
|
||||
approvalsNeeded: 1,
|
||||
approvalsNeeded: 1 as const,
|
||||
participants: approvalParticipants,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue