replicas-cli 0.2.66 → 0.2.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8269,6 +8269,8 @@ function parseCIFailure(content) {
|
|
|
8269
8269
|
const conclusionTextMatch = content.match(
|
|
8270
8270
|
/has (failed|timed out|requires action|was cancelled|failed to start)/
|
|
8271
8271
|
);
|
|
8272
|
+
const prUrlMatch = content.match(/\*\*PR URL:\*\*\s*(.+)/);
|
|
8273
|
+
const fileUrlMatch = content.match(/\*\*File URL:\*\*\s*(.+)/);
|
|
8272
8274
|
if (!prMatch) return null;
|
|
8273
8275
|
return {
|
|
8274
8276
|
source: "ci_failure",
|
|
@@ -8277,7 +8279,9 @@ function parseCIFailure(content) {
|
|
|
8277
8279
|
workflowFile: workflowFileMatch?.[1]?.trim() ?? "",
|
|
8278
8280
|
conclusion: conclusionMatch?.[1]?.trim() ?? "failure",
|
|
8279
8281
|
runUrl: runUrlMatch?.[1]?.trim() ?? "",
|
|
8280
|
-
conclusionText: conclusionTextMatch?.[1] ?? "failed"
|
|
8282
|
+
conclusionText: conclusionTextMatch?.[1] ?? "failed",
|
|
8283
|
+
prUrl: prUrlMatch?.[1]?.trim(),
|
|
8284
|
+
fileUrl: fileUrlMatch?.[1]?.trim()
|
|
8281
8285
|
};
|
|
8282
8286
|
}
|
|
8283
8287
|
function parseGitHubIssueNew(content) {
|
|
@@ -8287,15 +8291,19 @@ function parseGitHubIssueNew(content) {
|
|
|
8287
8291
|
const issueTitle = headerMatch[2].trim();
|
|
8288
8292
|
const descMatch = content.match(/## Issue Description\n([\s\S]*?)(?=\n## |$)/);
|
|
8289
8293
|
const triggerMatch = content.match(
|
|
8290
|
-
/## Triggering Comment from @(\S+)\n([\s\S]*?)(?=\n## |$)/
|
|
8294
|
+
/## Triggering Comment from @(\S+)\n([\s\S]*?)(?=\n\*\*(?:PR|Issue|User|File) URL:\*\*|\n## |$)/
|
|
8291
8295
|
);
|
|
8296
|
+
const issueUrlMatch = content.match(/\*\*Issue URL:\*\*\s*(.+)/);
|
|
8297
|
+
const userUrlMatch = content.match(/\*\*User URL:\*\*\s*(.+)/);
|
|
8292
8298
|
return {
|
|
8293
8299
|
source: "github_issue_new",
|
|
8294
8300
|
issueNumber,
|
|
8295
8301
|
issueTitle,
|
|
8296
8302
|
issueDescription: descMatch?.[1]?.trim() ?? "",
|
|
8297
8303
|
triggeringUser: triggerMatch?.[1] ?? "",
|
|
8298
|
-
triggeringComment: triggerMatch?.[2]?.trim() ?? ""
|
|
8304
|
+
triggeringComment: triggerMatch?.[2]?.trim() ?? "",
|
|
8305
|
+
issueUrl: issueUrlMatch?.[1]?.trim(),
|
|
8306
|
+
userUrl: userUrlMatch?.[1]?.trim()
|
|
8299
8307
|
};
|
|
8300
8308
|
}
|
|
8301
8309
|
function parseGitHubIssueExisting(content) {
|
|
@@ -8305,13 +8313,17 @@ function parseGitHubIssueExisting(content) {
|
|
|
8305
8313
|
if (!headerMatch) return null;
|
|
8306
8314
|
const issueNumber = parseInt(headerMatch[1], 10);
|
|
8307
8315
|
const commentMatch = content.match(
|
|
8308
|
-
/Comment from @(\S+):\n([\s\S]*?)(?=\nIMPORTANT INSTRUCTIONS:)/
|
|
8316
|
+
/Comment from @(\S+):\n([\s\S]*?)(?=\n\*\*(?:PR|Issue|User|File) URL:\*\*|\nIMPORTANT INSTRUCTIONS:)/
|
|
8309
8317
|
);
|
|
8318
|
+
const issueUrlMatch = content.match(/\*\*Issue URL:\*\*\s*(.+)/);
|
|
8319
|
+
const userUrlMatch = content.match(/\*\*User URL:\*\*\s*(.+)/);
|
|
8310
8320
|
return {
|
|
8311
8321
|
source: "github_issue_existing",
|
|
8312
8322
|
issueNumber,
|
|
8313
8323
|
commentUser: commentMatch?.[1] ?? "",
|
|
8314
|
-
commentBody: commentMatch?.[2]?.trim() ?? ""
|
|
8324
|
+
commentBody: commentMatch?.[2]?.trim() ?? "",
|
|
8325
|
+
issueUrl: issueUrlMatch?.[1]?.trim(),
|
|
8326
|
+
userUrl: userUrlMatch?.[1]?.trim()
|
|
8315
8327
|
};
|
|
8316
8328
|
}
|
|
8317
8329
|
function parseGitHubPRNew(content) {
|
|
@@ -8321,17 +8333,21 @@ function parseGitHubPRNew(content) {
|
|
|
8321
8333
|
if (!headerMatch) return null;
|
|
8322
8334
|
const prNumber = parseInt(headerMatch[1], 10);
|
|
8323
8335
|
const contextMatch = content.match(
|
|
8324
|
-
/@(\S+) mentioned @(?:replicas-connector|tryreplicas|replicas).*?\n\n>([\s\S]*?)(?=\n## Your Assignment)/
|
|
8336
|
+
/@(\S+) mentioned @(?:replicas-connector|tryreplicas|replicas).*?\n\n>([\s\S]*?)(?=\n\*\*(?:PR|Issue|User|File) URL:\*\*|\n## Your Assignment)/
|
|
8325
8337
|
);
|
|
8326
8338
|
let contextMessage = "";
|
|
8327
8339
|
if (contextMatch) {
|
|
8328
8340
|
contextMessage = contextMatch[2].split("\n").map((line) => line.replace(/^>\s?/, "")).join("\n").trim();
|
|
8329
8341
|
}
|
|
8342
|
+
const prUrlMatch = content.match(/\*\*PR URL:\*\*\s*(.+)/);
|
|
8343
|
+
const userUrlMatch = content.match(/\*\*User URL:\*\*\s*(.+)/);
|
|
8330
8344
|
return {
|
|
8331
8345
|
source: "github_pr_new",
|
|
8332
8346
|
prNumber,
|
|
8333
8347
|
mentioningUser: contextMatch?.[1] ?? "",
|
|
8334
|
-
contextMessage
|
|
8348
|
+
contextMessage,
|
|
8349
|
+
prUrl: prUrlMatch?.[1]?.trim(),
|
|
8350
|
+
userUrl: userUrlMatch?.[1]?.trim()
|
|
8335
8351
|
};
|
|
8336
8352
|
}
|
|
8337
8353
|
function parseGitHubPRExistingPRReview(content) {
|
|
@@ -8344,21 +8360,25 @@ function parseGitHubPRExistingPRReview(content) {
|
|
|
8344
8360
|
/@(\S+)\s+(APPROVED the pull request|REQUESTED CHANGES on the pull request|left a review comment on the pull request|had their review dismissed)/
|
|
8345
8361
|
);
|
|
8346
8362
|
const commentMatch = content.match(
|
|
8347
|
-
/Comment from @\S+:\n([\s\S]*?)(?=\nIMPORTANT INSTRUCTIONS:)/
|
|
8363
|
+
/Comment from @\S+:\n([\s\S]*?)(?=\n\*\*(?:PR|Issue|User|File) URL:\*\*|\nIMPORTANT INSTRUCTIONS:)/
|
|
8348
8364
|
);
|
|
8349
8365
|
let commentBody = commentMatch?.[1]?.trim() ?? "";
|
|
8350
8366
|
if (!commentBody) {
|
|
8351
8367
|
const bodyMatch = content.match(
|
|
8352
|
-
/reviewed the pull request\.\n([\s\S]*?)(?=\nIMPORTANT INSTRUCTIONS:)/
|
|
8368
|
+
/reviewed the pull request\.\n([\s\S]*?)(?=\n\*\*(?:PR|Issue|User|File) URL:\*\*|\nIMPORTANT INSTRUCTIONS:)/
|
|
8353
8369
|
);
|
|
8354
8370
|
commentBody = bodyMatch?.[1]?.trim() ?? "";
|
|
8355
8371
|
}
|
|
8372
|
+
const prUrlMatch = content.match(/\*\*PR URL:\*\*\s*(.+)/);
|
|
8373
|
+
const userUrlMatch = content.match(/\*\*User URL:\*\*\s*(.+)/);
|
|
8356
8374
|
return {
|
|
8357
8375
|
source: "github_pr_existing_pr_review",
|
|
8358
8376
|
prNumber,
|
|
8359
8377
|
reviewUser: actionMatch?.[1] ?? "",
|
|
8360
8378
|
reviewAction: actionMatch?.[2] ?? "reviewed the pull request",
|
|
8361
|
-
commentBody
|
|
8379
|
+
commentBody,
|
|
8380
|
+
prUrl: prUrlMatch?.[1]?.trim(),
|
|
8381
|
+
userUrl: userUrlMatch?.[1]?.trim()
|
|
8362
8382
|
};
|
|
8363
8383
|
}
|
|
8364
8384
|
function parseGitHubPRExistingReview(content) {
|
|
@@ -8371,15 +8391,21 @@ function parseGitHubPRExistingReview(content) {
|
|
|
8371
8391
|
if (!fileMatch || !diffMatch) return null;
|
|
8372
8392
|
const prNumber = parseInt(headerMatch[1], 10);
|
|
8373
8393
|
const commentMatch = content.match(
|
|
8374
|
-
/Comment from @(\S+):\n([\s\S]*?)(?=\nIMPORTANT INSTRUCTIONS:)/
|
|
8394
|
+
/Comment from @(\S+):\n([\s\S]*?)(?=\n\*\*(?:PR|Issue|User|File) URL:\*\*|\nIMPORTANT INSTRUCTIONS:)/
|
|
8375
8395
|
);
|
|
8396
|
+
const prUrlMatch = content.match(/\*\*PR URL:\*\*\s*(.+)/);
|
|
8397
|
+
const userUrlMatch = content.match(/\*\*User URL:\*\*\s*(.+)/);
|
|
8398
|
+
const fileUrlMatch = content.match(/\*\*File URL:\*\*\s*(.+)/);
|
|
8376
8399
|
return {
|
|
8377
8400
|
source: "github_pr_existing_review",
|
|
8378
8401
|
prNumber,
|
|
8379
8402
|
commentUser: commentMatch?.[1] ?? "",
|
|
8380
8403
|
commentBody: commentMatch?.[2]?.trim() ?? "",
|
|
8381
8404
|
filePath: fileMatch[1].trim(),
|
|
8382
|
-
diffHunk: diffMatch[1].trim()
|
|
8405
|
+
diffHunk: diffMatch[1].trim(),
|
|
8406
|
+
prUrl: prUrlMatch?.[1]?.trim(),
|
|
8407
|
+
userUrl: userUrlMatch?.[1]?.trim(),
|
|
8408
|
+
fileUrl: fileUrlMatch?.[1]?.trim()
|
|
8383
8409
|
};
|
|
8384
8410
|
}
|
|
8385
8411
|
function parseGitHubPRExistingGeneral(content) {
|
|
@@ -8389,30 +8415,38 @@ function parseGitHubPRExistingGeneral(content) {
|
|
|
8389
8415
|
if (!headerMatch) return null;
|
|
8390
8416
|
const prNumber = parseInt(headerMatch[1], 10);
|
|
8391
8417
|
const commentMatch = content.match(
|
|
8392
|
-
/Comment from @(\S+):\n([\s\S]*?)(?=\nIMPORTANT INSTRUCTIONS:)/
|
|
8418
|
+
/Comment from @(\S+):\n([\s\S]*?)(?=\n\*\*(?:PR|Issue|User|File) URL:\*\*|\nIMPORTANT INSTRUCTIONS:)/
|
|
8393
8419
|
);
|
|
8420
|
+
const prUrlMatch = content.match(/\*\*PR URL:\*\*\s*(.+)/);
|
|
8421
|
+
const userUrlMatch = content.match(/\*\*User URL:\*\*\s*(.+)/);
|
|
8394
8422
|
return {
|
|
8395
8423
|
source: "github_pr_existing_general",
|
|
8396
8424
|
prNumber,
|
|
8397
8425
|
commentUser: commentMatch?.[1] ?? "",
|
|
8398
|
-
commentBody: commentMatch?.[2]?.trim() ?? ""
|
|
8426
|
+
commentBody: commentMatch?.[2]?.trim() ?? "",
|
|
8427
|
+
prUrl: prUrlMatch?.[1]?.trim(),
|
|
8428
|
+
userUrl: userUrlMatch?.[1]?.trim()
|
|
8399
8429
|
};
|
|
8400
8430
|
}
|
|
8401
8431
|
function parseSlackTask(content) {
|
|
8402
8432
|
if (!content.startsWith("# Task from Slack")) return null;
|
|
8403
|
-
const targetMatch = content.match(/## Workspace Target\nWorking in: (
|
|
8433
|
+
const targetMatch = content.match(/## Workspace Target\nWorking in: (.+?)(?=\n\*\*(?:Thread|Target) URL:\*\*|\n\n)/);
|
|
8404
8434
|
const threadMatch = content.match(
|
|
8405
8435
|
/## Thread Context\n([\s\S]*?)(?=\n## Latest Message)/
|
|
8406
8436
|
);
|
|
8407
8437
|
const latestMatch = content.match(
|
|
8408
8438
|
/## Latest Message \(mentions you\)\n@(.+?): ([\s\S]*?)(?=\n## Response Instructions)/
|
|
8409
8439
|
);
|
|
8440
|
+
const threadUrlMatch = content.match(/\*\*Thread URL:\*\*\s*(.+)/);
|
|
8441
|
+
const targetUrlMatch = content.match(/\*\*Target URL:\*\*\s*(.+)/);
|
|
8410
8442
|
return {
|
|
8411
8443
|
source: "slack_task",
|
|
8412
8444
|
workspaceTarget: targetMatch?.[1]?.trim() ?? "",
|
|
8413
8445
|
threadContext: threadMatch?.[1]?.trim() ?? "",
|
|
8414
8446
|
latestMessageUser: latestMatch?.[1]?.trim() ?? "",
|
|
8415
|
-
latestMessageText: latestMatch?.[2]?.trim() ?? ""
|
|
8447
|
+
latestMessageText: latestMatch?.[2]?.trim() ?? "",
|
|
8448
|
+
threadUrl: threadUrlMatch?.[1]?.trim(),
|
|
8449
|
+
targetUrl: targetUrlMatch?.[1]?.trim()
|
|
8416
8450
|
};
|
|
8417
8451
|
}
|
|
8418
8452
|
function parseLinearIssue(content) {
|
|
@@ -8439,13 +8473,15 @@ function parseLinearIssue(content) {
|
|
|
8439
8473
|
/## Additional Context\n([\s\S]*?)(?=\n## |$)/
|
|
8440
8474
|
);
|
|
8441
8475
|
const additionalContext = contextMatch?.[1]?.trim() ?? "";
|
|
8476
|
+
const issueUrlMatch = content.match(/\*\*Issue URL:\*\*\s*(.+)/);
|
|
8442
8477
|
return {
|
|
8443
8478
|
source: "linear_issue",
|
|
8444
8479
|
identifier,
|
|
8445
8480
|
title,
|
|
8446
8481
|
parentIssue,
|
|
8447
8482
|
description,
|
|
8448
|
-
additionalContext
|
|
8483
|
+
additionalContext,
|
|
8484
|
+
issueUrl: issueUrlMatch?.[1]?.trim()
|
|
8449
8485
|
};
|
|
8450
8486
|
}
|
|
8451
8487
|
function parseUserMessage(rawContent) {
|
package/dist/index.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
setIdeCommand,
|
|
16
16
|
setOrganizationId,
|
|
17
17
|
writeConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-KFEFUK5A.mjs";
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
import "dotenv/config";
|
|
@@ -2509,12 +2509,12 @@ async function interactiveCommand() {
|
|
|
2509
2509
|
);
|
|
2510
2510
|
}
|
|
2511
2511
|
console.log(chalk18.gray("Starting interactive mode..."));
|
|
2512
|
-
const { launchInteractive } = await import("./interactive-
|
|
2512
|
+
const { launchInteractive } = await import("./interactive-WT776LWE.mjs");
|
|
2513
2513
|
await launchInteractive();
|
|
2514
2514
|
}
|
|
2515
2515
|
|
|
2516
2516
|
// src/index.ts
|
|
2517
|
-
var CLI_VERSION = "0.2.
|
|
2517
|
+
var CLI_VERSION = "0.2.68";
|
|
2518
2518
|
var program = new Command();
|
|
2519
2519
|
program.name("replicas").description("CLI for managing Replicas workspaces").version(CLI_VERSION);
|
|
2520
2520
|
program.command("login").description("Authenticate with your Replicas account").action(async () => {
|