Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(infra): regex on matching previews on previous id's (#847)

teod578d233a9fa
diff --git a/js/app/scripts/preview/get-or-create-id.ts b/js/app/scripts/preview/get-or-create-id.ts
index 3dca5502d5..7d677214ce 100644
--- a/js/app/scripts/preview/get-or-create-id.ts
+++ b/js/app/scripts/preview/get-or-create-id.ts
@@ -98,7 +98,7 @@ async function getExistingPreviewId(pr: number, repo: string, token: string): Pr
);
if (previewComment?.body) {
- const match = previewComment.body.match(/https:\/\/(.+)\.preview\.macro\.com/);
+ const match = previewComment.body.match(/https:\/\/([a-z0-9-]+)\.preview\.macro\.com/);
if (match?.[1]) {
return match[1];
}