feat: follow an epic with everything under it
«Seguir todo» on a ticket with subtasks (and on each epic of the Epics
page) tells you of it and of every ticket hanging from it, at any depth,
also the ones added later: their moves, assignments, comments and plan
changes, as a follower of each, plus when a ticket is placed under it.
Guests of a private project are left out. Personal, no history (Mongo
`tree_follows`).
API: followTree / unfollowTree, Issue.followingTree, PUT/DELETE
/api/issues/{issue}/follow-tree. MCP: watch_issue with tree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -565,19 +565,29 @@ export class IssuesResolver {
|
||||
@Tool({
|
||||
name: 'watch_issue',
|
||||
description:
|
||||
'Follow a ticket (notifications of its changes and comments) or stop following it.',
|
||||
'Follow a ticket (notifications of its changes and comments) or stop following it. With tree: true, an epic (or any ticket with subtasks) with everything under it, also tickets added later.',
|
||||
paramsSchema: z.object({
|
||||
issue: issueRef,
|
||||
follow: z.boolean().default(true),
|
||||
tree: z.boolean().default(false),
|
||||
}),
|
||||
annotations: { ...WRITE, idempotentHint: true },
|
||||
})
|
||||
watch(
|
||||
{ issue, follow }: { issue: string; follow: boolean },
|
||||
{ issue, follow, tree }: { issue: string; follow: boolean; tree: boolean },
|
||||
ctx: McpContext,
|
||||
) {
|
||||
const client = this.api.as(ctx);
|
||||
const options = { params: { path: { issue } } };
|
||||
if (tree)
|
||||
return toolResult(async () => {
|
||||
await this.api.data(
|
||||
follow
|
||||
? client.PUT('/api/issues/{issue}/follow-tree', options)
|
||||
: client.DELETE('/api/issues/{issue}/follow-tree', options),
|
||||
);
|
||||
return { issue, followingTree: follow };
|
||||
});
|
||||
return toolResult(() =>
|
||||
this.api.data(
|
||||
follow
|
||||
|
||||
Reference in New Issue
Block a user