jira-ticket-viewer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseJira Ticket Viewer
Jira工单查看器
Fetch and display Jira ticket details using the CLI tool.
jira使用 CLI工具获取并展示Jira工单详情。
jiraArguments
参数
- — Jira issue key (e.g.
$ARGUMENTS[0])PROJ-123 - — (optional) Base directory for all temp assets (raw JSON, attachments, parsed output). Defaults to
$ARGUMENTS[1].implement-assets/jira
When invoked by the orchestrator (e.g. ), is provided. When used standalone, it defaults to .
implement$ARGUMENTS[1].implement-assets/jira- — Jira问题密钥(例如
$ARGUMENTS[0])PROJ-123 - —(可选)所有临时资源的基础目录(原始JSON、附件、解析后的输出)。默认值为
$ARGUMENTS[1].implement-assets/jira
当由编排器(如)调用时,会提供。当独立使用时,默认值为。
implement$ARGUMENTS[1].implement-assets/jiraSystem Requirements
系统要求
- CLI installed and configured (https://github.com/ankitpokhrel/jira-cli)
jira
- 已安装并配置CLI(https://github.com/ankitpokhrel/jira-cli)
jira
Execution
执行步骤
- Pre-flight check: Run to verify the CLI is installed and authenticated — if it fails, follow error handling in references/rules.md. Do NOT continue until
jira mesucceeds.jira me - Validate against references/rules.md
$ARGUMENTS[0] - Fetch raw JSON (single API call): Run via Bash
mkdir -p $ARGUMENTS[1] && jira issue view $ARGUMENTS[0] --raw > $ARGUMENTS[1]/raw.json - Parse ticket: Run via Bash to get the parsed JSON output
node ./scripts/parse-ticket.js < $ARGUMENTS[1]/raw.json > $ARGUMENTS[1]/output.json - Interpret comments: If the parsed JSON contains a non-empty array, analyze them following references/comment-rules.md. Replace the
commentsarray in the JSON with acommentsobject, then save the updated JSON back tocommentSummaryusing the Write tool.$ARGUMENTS[1]/output.json - Attachments: If the parsed JSON contains a non-empty array, download them:
attachments- Run via Bash
node ./scripts/download-attachment.js --out $ARGUMENTS[1] < $ARGUMENTS[1]/raw.json - If is not set, follow error handling in references/rules.md
JIRA_API_TOKEN - Include downloaded attachment file paths in the output
- Run
- Return the parsed JSON output (see references/output-format.md for schema reference), including attachment download paths if any
- 预检检查:运行以验证CLI已安装并通过身份验证——如果失败,请遵循references/rules.md中的错误处理流程。在
jira me执行成功前,请勿继续。jira me - 根据references/rules.md验证
$ARGUMENTS[0] - 获取原始JSON(单次API调用):通过Bash运行
mkdir -p $ARGUMENTS[1] && jira issue view $ARGUMENTS[0] --raw > $ARGUMENTS[1]/raw.json - 解析工单:通过Bash运行以获取解析后的JSON输出
node ./scripts/parse-ticket.js < $ARGUMENTS[1]/raw.json > $ARGUMENTS[1]/output.json - 解读评论:如果解析后的JSON包含非空的数组,请按照references/comment-rules.md进行分析。将JSON中的
comments数组替换为comments对象,然后使用写入工具将更新后的JSON保存回commentSummary。$ARGUMENTS[1]/output.json - 附件:如果解析后的JSON包含非空的数组,请下载它们:
attachments- 通过Bash运行
node ./scripts/download-attachment.js --out $ARGUMENTS[1] < $ARGUMENTS[1]/raw.json - 如果未设置,请遵循references/rules.md中的错误处理流程
JIRA_API_TOKEN - 在输出中包含已下载附件的文件路径
- 通过Bash运行
- 返回解析后的JSON输出(参考references/output-format.md中的架构说明),如果有附件则包含附件下载路径