runline 0.11.0 → 0.11.1
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.
|
@@ -18,11 +18,19 @@ export function registerCommentActions(rl) {
|
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
20
|
rl.registerAction("comment.list", {
|
|
21
|
-
description: "List comments
|
|
22
|
-
inputSchema: t.Object({
|
|
21
|
+
description: "List comments. Pass issueId (UUID or identifier like 'LIN-123') to list one issue's comments; without it, lists workspace-wide (unscoped connections only).",
|
|
22
|
+
inputSchema: t.Object({
|
|
23
|
+
issueId: t.Optional(t.String({ description: "Only list comments on this issue. UUID or issue identifier (e.g., 'LIN-123')" })),
|
|
24
|
+
limit: t.Optional(t.Number({ description: "Max results (default 50)" })),
|
|
25
|
+
}, { additionalProperties: false }),
|
|
23
26
|
async execute(input, ctx) {
|
|
27
|
+
const { issueId, limit = 50 } = (input ?? {});
|
|
28
|
+
if (issueId) {
|
|
29
|
+
await assertIssueInScope(ctx, issueId);
|
|
30
|
+
const data = await gql(key(ctx), `query($id: String!, $first: Int) { issue(id: $id) { comments(first: $first) { nodes { ${COMMENT_FIELDS} } pageInfo { hasNextPage endCursor } } } }`, { id: issueId, first: limit });
|
|
31
|
+
return data.issue?.comments ?? null;
|
|
32
|
+
}
|
|
24
33
|
requireUnscoped(ctx, "comment.list");
|
|
25
|
-
const limit = input?.limit ?? 50;
|
|
26
34
|
const data = await gql(key(ctx), `query($first: Int) { comments(first: $first) { nodes { ${COMMENT_FIELDS} } pageInfo { hasNextPage endCursor } } }`, { first: limit });
|
|
27
35
|
return data.comments;
|
|
28
36
|
},
|