issue-triage
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseIssue Triage (Linear / Jira)
问题分类(Linear / Jira)
Drive triage sessions and bug sweeps across Linear or Jira with the Composio CLI. Pull the backlog, cluster duplicates, apply labels, and hand a clean list back to the team.
使用Composio CLI在Linear或Jira中开展分类工作和bug清理。拉取待办事项、聚类重复问题、添加标签,然后将整理好的列表交付给团队。
When to Use
使用场景
- Weekly triage: "what's unassigned, stale, or missing a priority?"
- Bug sweep after a release: "cluster all P1/P2 bugs, dedupe, assign owners."
- Cross-tool sync: Sentry → Linear, PagerDuty → Jira.
- 每周分类:“哪些问题未分配、已过期或缺少优先级标记?”
- 发布后bug清理:“将所有P1/P2级bug聚类、去重并分配负责人。”
- 跨工具同步:Sentry → Linear,PagerDuty → Jira。
Prereqs
前置条件
bash
curl -fsSL https://composio.dev/install | bash
composio login
composio link linear # or: composio link jirabash
curl -fsSL https://composio.dev/install | bash
composio login
composio link linear # or: composio link jiraDiscover Tools
发现工具
bash
composio search "list issues" --toolkits linear
composio search "search issues" --toolkits jira
composio tools list linear
composio tools list jiraCommon slugs (verify with ):
--get-schemaLinear
LINEAR_LIST_ISSUESLINEAR_CREATE_ISSUELINEAR_UPDATE_ISSUELINEAR_CREATE_COMMENT
Jira
JIRA_SEARCH_FOR_ISSUES_USING_JQLJIRA_CREATE_ISSUEJIRA_EDIT_ISSUEJIRA_ADD_COMMENTJIRA_ASSIGN_ISSUE
bash
composio search "list issues" --toolkits linear
composio search "search issues" --toolkits jira
composio tools list linear
composio tools list jira常用标识符(使用验证):
--get-schemaLinear
LINEAR_LIST_ISSUESLINEAR_CREATE_ISSUELINEAR_UPDATE_ISSUELINEAR_CREATE_COMMENT
Jira
JIRA_SEARCH_FOR_ISSUES_USING_JQLJIRA_CREATE_ISSUEJIRA_EDIT_ISSUEJIRA_ADD_COMMENTJIRA_ASSIGN_ISSUE
Triage Workflow
分类工作流
- Pull the backlog slice:
bash
# Linear composio execute LINEAR_LIST_ISSUES -d '{ "filter": { "state": { "type": { "eq": "unstarted" } }, "assignee": { "null": true } }, "first": 100 }' # Jira composio execute JIRA_SEARCH_FOR_ISSUES_USING_JQL -d '{ "jql": "project = APP AND statusCategory != Done AND assignee is EMPTY ORDER BY updated DESC", "maxResults": 100, "fields": ["summary","priority","labels","updated","reporter"] }' - Cluster by title similarity and labels. The agent groups likely duplicates locally.
- Apply updates in one pass (label, priority, assignee):
bash
composio execute LINEAR_UPDATE_ISSUE -d '{ "id":"abc-123","priority":2,"labelIds":["label-bug","label-p1"],"assigneeId":"user-42" }' composio execute JIRA_EDIT_ISSUE -d '{ "issueIdOrKey":"APP-482", "fields":{"priority":{"name":"High"},"labels":["bug","p1"]} }' - Link duplicates with comments referencing the canonical issue.
- Post a digest of what changed to Slack so the team sees the sweep results.
- 拉取待办事项片段:
bash
# Linear composio execute LINEAR_LIST_ISSUES -d '{ "filter": { "state": { "type": { "eq": "unstarted" } }, "assignee": { "null": true } }, "first": 100 }' # Jira composio execute JIRA_SEARCH_FOR_ISSUES_USING_JQL -d '{ "jql": "project = APP AND statusCategory != Done AND assignee is EMPTY ORDER BY updated DESC", "maxResults": 100, "fields": ["summary","priority","labels","updated","reporter"] }' - 聚类:根据标题相似度和标签进行聚类。代理会在本地将可能重复的问题分组。
- 一次性应用更新(标签、优先级、负责人):
bash
composio execute LINEAR_UPDATE_ISSUE -d '{ "id":"abc-123","priority":2,"labelIds":["label-bug","label-p1"],"assigneeId":"user-42" }' composio execute JIRA_EDIT_ISSUE -d '{ "issueIdOrKey":"APP-482", "fields":{"priority":{"name":"High"},"labels":["bug","p1"]} }' - 关联重复问题:添加引用标准问题的评论。
- 发布汇总:将变更内容发布到Slack,让团队看到清理结果。
Bug Sweep (Post-Release)
发布后Bug清理
bash
undefinedbash
undefinedJira: every bug filed in the last 7 days, sorted by severity
Jira: every bug filed in the last 7 days, sorted by severity
composio execute JIRA_SEARCH_FOR_ISSUES_USING_JQL -d '{
"jql":"type = Bug AND created >= -7d ORDER BY priority DESC, created ASC",
"fields":["summary","priority","labels","reporter","components"]
}' | jq -r '.issues[] | "(.fields.priority.name)\t(.key)\t(.fields.summary)"'
undefinedcomposio execute JIRA_SEARCH_FOR_ISSUES_USING_JQL -d '{
"jql":"type = Bug AND created >= -7d ORDER BY priority DESC, created ASC",
"fields":["summary","priority","labels","reporter","components"]
}' | jq -r '.issues[] | "(.fields.priority.name)\t(.key)\t(.fields.summary)"'
undefinedWorkflow File
工作流文件
scripts/triage-linear.tscomposio run --file scripts/triage-linear.tsts
const { nodes: issues } = await execute("LINEAR_LIST_ISSUES", {
filter: { state: { type: { eq: "unstarted" } }, assignee: { null: true } },
first: 100
});
const stale = issues.filter(i => {
const age = (Date.now() - new Date(i.updatedAt).getTime()) / 86400000;
return age > 14;
});
for (const i of stale) {
await execute("LINEAR_CREATE_COMMENT", {
issueId: i.id,
body: "Auto-triage: stale for 14+ days. Please assign or close."
});
}
await execute("SLACK_SEND_MESSAGE", {
channel: "triage",
text: `Weekly triage: pinged ${stale.length} stale issues.`
});scripts/triage-linear.tscomposio run --file scripts/triage-linear.tsts
const { nodes: issues } = await execute("LINEAR_LIST_ISSUES", {
filter: { state: { type: { eq: "unstarted" } }, assignee: { null: true } },
first: 100
});
const stale = issues.filter(i => {
const age = (Date.now() - new Date(i.updatedAt).getTime()) / 86400000;
return age > 14;
});
for (const i of stale) {
await execute("LINEAR_CREATE_COMMENT", {
issueId: i.id,
body: "Auto-triage: stale for 14+ days. Please assign or close."
});
}
await execute("SLACK_SEND_MESSAGE", {
channel: "triage",
text: `Weekly triage: pinged ${stale.length} stale issues.`
});Cross-Tool: Sentry → Linear
跨工具同步:Sentry → Linear
bash
composio run '
const hot = await execute("SENTRY_LIST_A_PROJECTS_ISSUES", {
organization_slug:"acme", project_slug:"api",
query:"is:unresolved", sort:"freq", limit:5
});
for (const s of hot) {
await execute("LINEAR_CREATE_ISSUE", {
teamId: "TEAM_ID",
title: `[Sentry] ${s.title}`,
description: `${s.permalink}\nCount: ${s.count}`,
labelIds: ["label-bug","label-from-sentry"]
});
}
'bash
composio run '
const hot = await execute("SENTRY_LIST_A_PROJECTS_ISSUES", {
organization_slug:"acme", project_slug:"api",
query:"is:unresolved", sort:"freq", limit:5
});
for (const s of hot) {
await execute("LINEAR_CREATE_ISSUE", {
teamId: "TEAM_ID",
title: `[Sentry] ${s.title}`,
description: `${s.permalink}\nCount: ${s.count}`,
labelIds: ["label-bug","label-from-sentry"]
});
}
'Troubleshooting
故障排除
- Unknown field names → shows the exact filter shape (Linear uses nested objects; Jira uses JQL strings).
composio execute <SLUG> --get-schema - on Linear → re-run
403with the right workspace.composio link linear - Jira custom fields missing → request them explicitly in the array.
fields - Bulk edits rate-limited → insert a 250ms sleep in the loop; don't use
composio run.--parallel
Full CLI reference: docs.composio.dev/docs/cli
- 未知字段名称 → 使用查看精确的筛选格式(Linear使用嵌套对象;Jira使用JQL字符串)。
composio execute <SLUG> --get-schema - on Linear → 使用正确的工作区重新运行
403。composio link linear - Jira自定义字段缺失 → 在数组中明确请求这些字段。
fields - 批量编辑受速率限制 → 在循环中插入250毫秒的延时;不要使用
composio run参数。--parallel
完整CLI参考文档:docs.composio.dev/docs/cli