Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Read dry run from a --dry-run flag in the partiallyApproved backfill

Rafie656a0e4b49a
diff --git a/apps/web/scripts/migrations/backfill-bounty-partially-approved.ts b/apps/web/scripts/migrations/backfill-bounty-partially-approved.ts
index 117c39c60b..f5f1e6ebec 100644
--- a/apps/web/scripts/migrations/backfill-bounty-partially-approved.ts
+++ b/apps/web/scripts/migrations/backfill-bounty-partially-approved.ts
@@ -13,7 +13,8 @@ type SubmissionStatusUpdate = Pick<
to: Extract<BountySubmissionStatus, "partiallyApproved" | "approved">;
};
-const DRY_RUN = true;
+// Dry run by default. Pass --dry-run=false to write the changes.
+const DRY_RUN = !process.argv.slice(2).includes("--dry-run=false");
const BATCH_SIZE = 500;
// Closes partially approved social metrics submissions that are stuck in the review queue