Skip to content

Commit

Permalink
fix: Recreate approval on redeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
adityachoudhari26 committed Oct 19, 2024
1 parent 718d93c commit ce0d068
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/job-dispatch/src/policy-create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,11 @@ export const createJobApprovals = async (
releaseId: p.release.id,
})),
)
.onConflictDoNothing();
.onConflictDoUpdate({
target: [
environmentPolicyApproval.policyId,
environmentPolicyApproval.releaseId,
],
set: { status: "pending" },
});
};

0 comments on commit ce0d068

Please sign in to comment.