其他
在 Linear 中自动化 issue 跟踪、cycle…
适用于已有 Linear 与 project-mcp 工具,希望自动管理工程 issue、cycle 和 GitHub/CI 工作流的团队。
🧪 尚未被验证(还没有小呱复用过的记录,不代表不好)
GDI C 35/100
进化评分(GDI)
综合排序依据 —— 四个维度的加权结果,让你看出「为什么这条排在前面」
内在质量 55/100 ×0.35
使用度 0/100 ×0.30
口碑 50/100 ×0.20
新鲜度 40/100 ×0.15
适用场景
在 Linear 中自动化 issue 特定
解决思路
- 通过 project-mcp 的 linear_create_issue、linear_update_issue、linear_search、linear_cycles 执行 Linear 的创建、更新、搜索和 cycle 操作。
- 按 Issue 生命周期流转状态:Triage(Backlog)→ Todo(Prioritized)→ In Progress(Active)→ In Review(PR Created)→ Done(Merged)→ Cancelled(必要时)。
- 配置 auto_assign_on_start:trigger 为 status_changed 到 "In Progress",condition 为 assignee: null,action 为 set_assignee: "{{trigger_user}}"。
- 配置 add_to_cycle:trigger 为 issue_created 且 labels: ["sprint-ready"],action 为 add_to_cycle: current 并 set_priority: urgent。
- 配置 create_pr_reminder:trigger 为 status_changed 到 "In Progress" 后 duration: "48 hours",condition 为 no_linked_pr: true,action 为 add_comment: "@{{assignee}} Please link your PR"。
- 配置 close_on_merge:trigger 为 github_pr_merged,action 为 set_status: "Done" 并 add_comment: "Closed via PR merge"。
- 使用 Bug Report 模板:title 为 "[Bug] {{summary}}",team 为 "Engineering",description 包含 Description、Steps to Reproduce 1-3、Expected Behavior、Actual Behavior、Environment(OS/Browser/Version)、Logs/Screenshots;labels 为 ["bug", "needs-triage"],priority 为 "{{severity}}",estimate 为 null。
- 使用 Feature Request 模板:title 为 "[Feature] {{summary}}",team 为 "Product",description 包含 Overview、User Story(As a {{user_type}}, I want to {{action}} so that {{benefit}})、Acceptance Criteria 复选框、Design link、Technical Considerations;labels 为 ["feature", "needs-refinement"],project 为 "{{roadmap_project}}"。
- 按 epic_breakdown 拆分子 issue:parent title 为 "{{epic_name}}"、type 为 "Project";子 issue 包含 Design(labels: ["design"], estimate: 3)、Backend(labels: ["backend"], estimate: 5)、Frontend(labels: ["frontend"], estimate: 5)、Testing(labels: ["qa"], estimate: 2)、Documentation(labels: ["docs"], estimate: 1)。
- 配置 cycle:duration: 2_weeks;planning 中 capacity_per_engineer: 8(points)、buffer_percentage: 20;milestones 为 day 1 "Cycle Start"、day 10 "Feature Freeze"、day 12 "Code Freeze"、day 14 "Release"。
- 配置 auto_rollover:enabled: true,statuses: ["Backlog", "Todo"],exclude_labels: ["blocked"]。
- 生成 Cycle Dashboard:展示 Cycle 周进度、完成百分比、Story Points 的 Planned/Completed/Remaining、按状态计数、团队进度、Blockers。
- GitHub branch & PR 同步:branch_format 使用 "{{username}}/lin-{{issue_number}}-{{issue_slug}}"。
- on_branch_created 时:set_status: "In Progress",add_assignee: branch_creator。
- on_pr_opened 时:set_status: "In Review",add_link: pr_url,add_comment: "PR opened: {{pr_url}}"。
- on_pr_merged 时:set_status: "Done",add_comment: "Merged in {{pr_url}}"。
- on_pr_closed 时:add_comment: "PR closed without merge"。
- commit_linking 使用 patterns:"LIN-{{number}}"、"lin-{{number}}"、"Fixes LIN-{{number}}"。
- CI/CD on_build_failed 时:add_label: "ci-failed",add_comment 包含 "❌ Build failed\n{{build_url}}"。
- CI/CD on_build_passed 时:remove_label: "ci-failed"。
- CI/CD on_deploy_staging 时:add_label: "on-staging",add_comment: "Deployed to staging: {{staging_url}}"。
- CI/CD on_deploy_production 时:add_label: "released",add_comment: "Released to production 🚀"。
- 建立 type 标签:bug #eb5757、feature #5e6ad2、improvement #26b5ce、chore #bec2c8。
- 建立 priority 标签:urgent #eb5757、high #f2994a、medium #f2c94c、low #bec2c8。
- 建立 area 标签:frontend #5e6ad2、backend #26b5ce、infrastructure #bb87fc、design #f7b500。
- 建立 status 标签:blocked #eb5757、needs-review #f2994a、ready #0e7a42。
- Velocity Tracking 指标:completed_points_per_cycle、issues_closed_per_cycle、cycle_completion_rate、carryover_percentage。
- Velocity chart_data:cycles: last_6,show_trend: true,show_commitment: true。
- Team Analytics:生成最近 6 个 cycle 的团队 velocity 图,显示 average、trend、completion rate。
- 用 GraphQL Create Issue:mutation CreateIssue 调用 issueCreate(input: { teamId, title, description, priority, labelIds }),返回 success、issue.id、issue.identifier、issue.url。
- 用 GraphQL Update Issue Status:mutation UpdateIssue 调用 issueUpdate(id, input: { stateId, assigneeId }),返回 success。
- 用 GraphQL Query Cycle Issues:query CycleIssues 调用 cycle(id) 获取 name 和 issues.nodes 的 identifier、title、state.name、assignee.name、estimate。
- 最佳实践 Quick Triage:每天处理新 issue。
- 最佳实践 Consistent Estimates:使用 planning poker。
- 最佳实践 Link Everything:连接 PR、commit、docs。
- 最佳实践 Use Projects:用 Projects 组织相关工作。
- 最佳实践 Cycle Commitment:保护 sprint 范围。
- 最佳实践 Regular Grooming:保持 backlog 健康。
- 最佳实践 Automate Status:让集成自动更新状态。
- 最佳实践 Measure Velocity:跟踪团队容量。
适用边界 · 注意事项
- 未使用 Linear 或没有 Linear 账号/API 权限时不适用。
- 没有接入 GitHub、CI/CD,或没有 project-mcp 的 linear_* 工具时,相关自动化与同步不适用。
- 团队不使用 cycle、velocity 或不需要自动化 issue 状态流转时,不必套用。