replicas-cli 0.2.276 → 0.2.277
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.
- package/dist/index.mjs +41 -14
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9236,7 +9236,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
|
|
|
9236
9236
|
var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
|
|
9237
9237
|
|
|
9238
9238
|
// ../shared/src/cli-version.ts
|
|
9239
|
-
var CLI_VERSION = "0.2.
|
|
9239
|
+
var CLI_VERSION = "0.2.277";
|
|
9240
9240
|
|
|
9241
9241
|
// ../shared/src/engine/environment.ts
|
|
9242
9242
|
var DESKTOP_NOVNC_PORT = 6080;
|
|
@@ -10800,25 +10800,51 @@ function parseGitHubPRExistingReview(content) {
|
|
|
10800
10800
|
};
|
|
10801
10801
|
}
|
|
10802
10802
|
function parseGitHubPRExistingGeneral(content) {
|
|
10803
|
-
const
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
const commentMatch = content.match(
|
|
10809
|
-
/Comment from @(\S+):\n([\s\S]*?)(?=\n\*\*(?:PR|Issue|User|File) URL:\*\*|\nIMPORTANT INSTRUCTIONS:)/
|
|
10803
|
+
const fields = parseHostReviewThreadFields(
|
|
10804
|
+
content,
|
|
10805
|
+
/^You received a comment on Pull Request #(\d+)\./m,
|
|
10806
|
+
/Comment from @(\S+):\n([\s\S]*?)(?=\n\*\*(?:PR|Issue|User|File) URL:\*\*|\nIMPORTANT INSTRUCTIONS:)/,
|
|
10807
|
+
/\*\*PR URL:\*\*\s*(.+)/
|
|
10810
10808
|
);
|
|
10811
|
-
|
|
10809
|
+
if (!fields) return null;
|
|
10812
10810
|
const userUrlMatch = content.match(/\*\*User URL:\*\*\s*(.+)/);
|
|
10813
10811
|
return {
|
|
10814
10812
|
source: "github_pr_existing_general",
|
|
10815
|
-
prNumber,
|
|
10816
|
-
commentUser:
|
|
10817
|
-
commentBody:
|
|
10818
|
-
prUrl:
|
|
10813
|
+
prNumber: fields.itemNumber,
|
|
10814
|
+
commentUser: fields.commentUser,
|
|
10815
|
+
commentBody: fields.commentBody,
|
|
10816
|
+
prUrl: fields.itemUrl,
|
|
10819
10817
|
userUrl: userUrlMatch?.[1]?.trim()
|
|
10820
10818
|
};
|
|
10821
10819
|
}
|
|
10820
|
+
function parseGitLabMRExistingGeneral(content) {
|
|
10821
|
+
const fields = parseHostReviewThreadFields(
|
|
10822
|
+
content,
|
|
10823
|
+
/^You received a comment on GitLab Merge Request !(\d+)\./m,
|
|
10824
|
+
/Comment from @?([^:\n]+):\n([\s\S]*?)(?=\n\*\*(?:Merge Request|Comment)(?: URL)?:\*\*|\nIMPORTANT INSTRUCTIONS:)/,
|
|
10825
|
+
/\*\*Comment URL:\*\*\s*(.+)/
|
|
10826
|
+
);
|
|
10827
|
+
if (!fields) return null;
|
|
10828
|
+
return {
|
|
10829
|
+
source: "gitlab_mr_existing_general",
|
|
10830
|
+
mergeRequestIid: fields.itemNumber,
|
|
10831
|
+
commentUser: fields.commentUser,
|
|
10832
|
+
commentBody: fields.commentBody,
|
|
10833
|
+
commentUrl: fields.itemUrl
|
|
10834
|
+
};
|
|
10835
|
+
}
|
|
10836
|
+
function parseHostReviewThreadFields(content, headerPattern, commentPattern, itemUrlPattern) {
|
|
10837
|
+
const headerMatch = content.match(headerPattern);
|
|
10838
|
+
if (!headerMatch) return null;
|
|
10839
|
+
const commentMatch = content.match(commentPattern);
|
|
10840
|
+
const itemUrlMatch = content.match(itemUrlPattern);
|
|
10841
|
+
return {
|
|
10842
|
+
itemNumber: parseInt(headerMatch[1], 10),
|
|
10843
|
+
commentUser: commentMatch?.[1]?.trim() ?? "",
|
|
10844
|
+
commentBody: commentMatch?.[2]?.trim() ?? "",
|
|
10845
|
+
itemUrl: itemUrlMatch?.[1]?.trim()
|
|
10846
|
+
};
|
|
10847
|
+
}
|
|
10822
10848
|
function parseSlackTask(content) {
|
|
10823
10849
|
if (!content.startsWith("# Task from Slack")) return null;
|
|
10824
10850
|
const targetMatch = content.match(/## Workspace Target\nWorking in: (.+?)(?=\n\*\*(?:Thread|Target) URL:\*\*|\n\n)/);
|
|
@@ -10911,7 +10937,7 @@ function parseAutomationTriggered(content) {
|
|
|
10911
10937
|
};
|
|
10912
10938
|
}
|
|
10913
10939
|
function parseSingleMessage(content) {
|
|
10914
|
-
return parseCIFailure(content) ?? parseGitHubIssueNew(content) ?? parseGitHubIssueExisting(content) ?? parseGitLabIssueNew(content) ?? parseGitLabIssueExisting(content) ?? parseGitHubPRNew(content) ?? parseGitHubPRExistingPRReview(content) ?? parseGitHubPRExistingReview(content) ?? parseGitHubPRExistingGeneral(content) ?? parseSlackTask(content) ?? parseLinearIssue(content) ?? parseAutomationTriggered(content) ?? parseInlineDiffComments(content) ?? parsePlanQuote(content) ?? { source: "raw", content };
|
|
10940
|
+
return parseCIFailure(content) ?? parseGitHubIssueNew(content) ?? parseGitHubIssueExisting(content) ?? parseGitLabIssueNew(content) ?? parseGitLabIssueExisting(content) ?? parseGitHubPRNew(content) ?? parseGitHubPRExistingPRReview(content) ?? parseGitHubPRExistingReview(content) ?? parseGitHubPRExistingGeneral(content) ?? parseGitLabMRExistingGeneral(content) ?? parseSlackTask(content) ?? parseLinearIssue(content) ?? parseAutomationTriggered(content) ?? parseInlineDiffComments(content) ?? parsePlanQuote(content) ?? { source: "raw", content };
|
|
10915
10941
|
}
|
|
10916
10942
|
function parseMerged(content) {
|
|
10917
10943
|
if (!content.includes(MERGED_MESSAGE_SEPARATOR)) return null;
|
|
@@ -10939,6 +10965,7 @@ var SOURCE_CONFIG = {
|
|
|
10939
10965
|
github_pr_existing_review: { label: "Code Review", color: "#8b949e" },
|
|
10940
10966
|
github_pr_existing_pr_review: { label: "PR Review", color: "#8b949e" },
|
|
10941
10967
|
github_pr_existing_general: { label: "GitHub PR", color: "#8b949e" },
|
|
10968
|
+
gitlab_mr_existing_general: { label: "GitLab MR", color: "#fc6d26" },
|
|
10942
10969
|
slack_task: { label: "Slack", color: "#BF6CC2" },
|
|
10943
10970
|
automation_triggered: { label: "Automation", color: "#f59e0b" },
|
|
10944
10971
|
plan_quote: { label: "Plan", color: "#3eeba3" },
|