issue tracking
Linear
Linear
Connect Linear to let agents create issues, update statuses, and track project progress. Agents can automatically file bugs from investigations and keep your product development workflow in sync with your infrastructure.
連接
從終端機連接Linear。傳入--help可查看Linear接受的旗標。
Terminal
polylane integration connect --type linear具有寫入權限的個人API金鑰。
連接Linear,讓代理可以從調查建立issue、更新狀態,並讓你的問題追蹤工具與它們的發現保持同步。
設定
- 在Linear中開啟Settings並前往Security & access。
- 在Personal API keys底下建立一把金鑰。它需要寫入權限,代理才能建立與更新issue。
- 把金鑰貼到Polylane。Polylane針對你的Linear工作區驗證它並完成連接。
你的金鑰在儲存前會先加密,代理永遠看不到它。
代理能做什麼
- 列出團隊、工作流程狀態、成員與專案
- 列出、搜尋與讀取issue及其近期留言
- 從調查發現建立issue,描述中附上證據軌跡
- 更新issue的狀態、優先度、指派人、專案、標籤與到期日
- 在issue上留言發現與狀態
- 對Linear API執行任意GraphQL以處理上述未涵蓋的事項;mutation要通過同樣的確認關卡
Issue寫入在執行前一律會要求確認。
Webhook與分流
連接會在你的Linear工作區註冊一個Polylane webhook,涵蓋所有公開團隊中的issue。有了這個webhook:
- 變為緊急的issue會以警示的形式落地並在觸發時被分流;降低緊急程度或完成該issue會解決該警示。
建立webhook需要該API金鑰的使用者是Linear中的工作區管理員。非管理員的金鑰仍可連接,每個代理工具都能運作;只有由webhook驅動的分流會被略過。
疑難排解
「Invalid API key」錯誤
- 使用來自Security & access的個人API金鑰;不支援OAuth權杖。Polylane會在Authorization標頭中原樣送出金鑰,不加Bearer前綴,完全符合Linear對個人金鑰的預期。
- 檢查該金鑰是否已在Linear中被撤銷。
沒有來自Linear的警示或觸發
- 建立webhook需要工作區管理員的金鑰。用管理員的金鑰重新連接,以啟用由webhook驅動的分流與觸發。
中斷連接
在Polylane中斷Linear的連接(這也會移除它註冊的webhook),然後在Linear中撤銷該API金鑰。
中斷連接
中斷連接會停止所有同步與檢查,並刪除Polylane持有的憑證。 Polylane在Linear中建立的一切也會一併移除;不會留下任何東西。
Terminal
polylane integration disconnect <id>工具
4代理可以在對話串中執行的操作。
Api
Run any Linear GraphQL query or mutation that lacks a dedicated tool
Teams
List Linear teams, workflow states, and members
Projects
List Linear projects and their delivery state
Issues
Read, search, create, update, and comment on Linear issues