DevRev Skill
Interact with DevRev via its REST API to manage issues, tickets, and parts.
Setup
Requires a DevRev PAT token. Read from env var DEVREV_TOKEN or ask the user to provide it.
CODEBLOCK0
Base URL: https://api.devrev.ai
Auth header: Authorization: <token> (no "Bearer" prefix needed)
Common Operations
List Works (issues + tickets)
CODEBLOCK1
Filter by type:
CODEBLOCK2
Get a Specific Work Item
CODEBLOCK3
Create an Issue
CODEBLOCK4
Create a Ticket
CODEBLOCK5
Severity options: blocker, high, medium, INLINECODE6
Update a Work Item
CODEBLOCK6
Search Works
CODEBLOCK7
List Parts (products, features, enhancements)
CODEBLOCK8
Key Data Structures
See references/api.md for full field details and DON ID format.
Tips
- - DON IDs are the full
don:core:... identifiers used for all references - display_id (e.g.
ISS-72, TKT-29) is human-readable but use the DON ID for API calls - To get parts (products) for creating works, call
parts.list first - Priority for issues:
p0 (critical) → p1 → p2 → INLINECODE15 - Stage names for issues:
triage, in_development, INLINECODE18 - Stage names for tickets:
queued, work_in_progress, INLINECODE21
DevRev 技能
通过 DevRev 的 REST API 与其交互,以管理工作项、工单和部件。
设置
需要 DevRev PAT 令牌。从环境变量 DEVREV_TOKEN 读取,或要求用户提供。
bash
export DEVREV_TOKEN=<你的-pat-令牌>
基础 URL:https://api.devrev.ai
认证头:Authorization: <令牌>(无需 Bearer 前缀)
常见操作
列出工作项(问题 + 工单)
bash
curl -s https://api.devrev.ai/works.list \
-H Authorization: $DEVREV_TOKEN | python3 -m json.tool
按类型筛选:
bash
仅问题
curl -s https://api.devrev.ai/works.list?type[]=issue \
-H Authorization: $DEVREV_TOKEN
仅工单
curl -s https://api.devrev.ai/works.list?type[]=ticket \
-H Authorization: $DEVREV_TOKEN
获取特定工作项
bash
按 DON ID 获取
curl -s -X POST https://api.devrev.ai/works.get \
-H Authorization: $DEVREV_TOKEN \
-H Content-Type: application/json \
-d {id: don:core:dvrv-us-1:devo/XXXX:issue/72}
创建问题
bash
curl -s -X POST https://api.devrev.ai/works.create \
-H Authorization: $DEVREV_TOKEN \
-H Content-Type: application/json \
-d {
type: issue,
title: 问题标题,
body: 此处填写描述,
applies
topart: don:core:...:product/X,
owned_by: [don:identity:...:devu/1]
}
创建工单
bash
curl -s -X POST https://api.devrev.ai/works.create \
-H Authorization: $DEVREV_TOKEN \
-H Content-Type: application/json \
-d {
type: ticket,
title: 工单标题,
body: 此处填写描述,
applies
topart: don:core:...:product/X,
severity: medium
}
严重级别选项:blocker、high、medium、low
更新工作项
bash
curl -s -X POST https://api.devrev.ai/works.update \
-H Authorization: $DEVREV_TOKEN \
-H Content-Type: application/json \
-d {
id: don:core:...:issue/72,
title: 更新后的标题,
body: 更新后的描述
}
搜索工作项
bash
curl -s -X POST https://api.devrev.ai/works.list \
-H Authorization: $DEVREV_TOKEN \
-H Content-Type: application/json \
-d {
type: [issue],
stage: {name: [triage, in_development]}
}
列出部件(产品、功能、增强)
bash
curl -s https://api.devrev.ai/parts.list \
-H Authorization: $DEVREV_TOKEN
关键数据结构
完整字段详情和 DON ID 格式请参见 references/api.md。
提示
- - DON ID 是用于所有引用的完整 don:core:... 标识符
- displayid(例如 ISS-72、TKT-29)是人类可读的,但 API 调用请使用 DON ID
- 要获取用于创建工作项的部件(产品),请先调用 parts.list
- 问题优先级:p0(严重)→ p1 → p2 → p3
- 问题阶段名称:triage、indevelopment、completed
- 工单阶段名称:queued、workinprogress、resolved