科研技能库/分析API:创建挑选问题
其他
未发现用户侧风险

分析API:创建挑选问题

创建一个KTIJ跟踪问题,用于将KT修复挑选到IntelliJ分支。适用于挑选分析API修复时使用。

文件预览

1 个文件
SKILL.md
2.7 KB · 可预览
---
name: analysis-api-create-cherry-pick-issue
description: Create a KTIJ cherry-pick tracking issue for a KT fix that needs to be cherry-picked to an IntelliJ branch. Use when cherry-picking Analysis API fixes.
disable-model-invocation: true
---

# Analysis API: Create Cherry-Pick Issue

Creates a KTIJ tracking issue for cherry-picking a KT fix to an IntelliJ release branch.

## Prerequisites

This skill requires the **YouTrack MCP** (`mcp__YouTrack__*` tools). If the YouTrack MCP is not available, **stop immediately** and inform the user that this skill cannot run without it.

## Required User Inputs

- **KT issue ID** (e.g. `KT-84711`)
- **Target version** (e.g. `2026.1.1`)
- **Commit hashes** (e.g. `0e2ca82e`, `449bdb32`)

## Workflow

### Step 1: Gather data

Run these in parallel:

1. **Fetch the KT issue** via `mcp__YouTrack__get_issue` to get:
    - `summary` — used in the KTIJ issue summary
    - `customFields.Severity` — mapped to KTIJ Priority (see mapping below)
2. **Fetch the current user** via `mcp__YouTrack__get_current_user` to get the `login` for the assignee.

**Severity-to-Priority mapping** (KT Severity → KTIJ Priority):

| KT Severity | KTIJ Priority |
|---|---|
| Critical | Critical |
| Major | Major |
| Normal | Normal |
| Minor | Minor |

If the KT issue has no Severity or an unmapped value, default to `Normal`.

### Step 2: Confirm with user

Before creating the issue, present the resolved fields and ask for confirmation:

- **Summary:** `Cherry-pick {KT-ID}: {KT summary} to {target version}`
- **Priority:** (mapped from Severity)
- **Assignee:** (from current user)
- **Commits:** (as provided)

### Step 3: Create the issue

Use `mcp__YouTrack__create_issue` with:

```
project: KTIJ
summary: "Cherry-pick {KT-ID}: {KT summary} to {target version}"
description: (see template below)
permittedGroups: ["jetbrains-team"]
customFields:
  Type: Task
  Priority: (mapped)
  State: Open
  Subsystems: ["IDE"]
  Planned for: ["{target version}"]
  Assignee: (current user login)
```

**Description template:**

```
Cherry-pick the fix for [{KT-ID}](https://youtrack.jetbrains.com/issue/{KT-ID}) to IntelliJ {target version}.

**Commits:** `{hash1}`, `{hash2}`, ...

**Original issue:** {KT-ID} — {KT summary}
```

### Step 4: Add tag

Use `mcp__YouTrack__manage_issue_tags` to add `Needs cherry-picking` to the created issue.

### Step 5: Link issues

Use `mcp__YouTrack__link_issues` to link the KT issue as a **previous step** of the new KTIJ issue:

```
targetIssueId: {KTIJ-ID}
linkType: "previous step"
issueToLinkId: {KT-ID}
```

### Step 6: Verify

Fetch the created issue via `mcp__YouTrack__get_issue` and confirm all fields are correct. Report the issue ID and URL to the user.

SKILL.md

元数据
nameanalysis-api-create-cherry-pick-issue
description创建一个KTIJ挑选跟踪问题,用于将需要挑选到IntelliJ分支的KT修复添加跟踪。在挑选分析API修复时使用。
disable-model-invocationtrue

分析API:创建挑选问题

创建一个KTIJ跟踪问题,用于将KT修复挑选到IntelliJ发布分支。

先决条件

本技能需要YouTrack MCP(mcp__YouTrack__*工具)。如果YouTrack MCP不可用,立即停止并通知用户本技能无法运行。

所需用户输入

  • KT问题ID(例如 KT-84711)
  • 目标版本(例如 2026.1.1)
  • 提交哈希(例如 0e2ca82e、449bdb32)

工作流

第1步:收集数据

并行执行以下操作:

  1. 获取KT问题 通过 mcp__YouTrack__get_issue 获取:
    • summary — 用于KTIJ问题摘要
    • customFields.Severity — 映射到KTIJ优先级(见下方映射)
  2. 获取当前用户 通过 mcp__YouTrack__get_current_user 获取负责人的 login。

严重性到优先级的映射(KT严重性 → KTIJ优先级):

KT严重性KTIJ优先级
CriticalCritical
MajorMajor
NormalNormal
MinorMinor

如果KT问题没有严重性或值未映射,则默认使用 Normal。

第2步:与用户确认

在创建问题前,展示解析后的字段并请求确认:

  • 摘要: Cherry-pick {KT-ID}: {KT摘要} 到 {目标版本}
  • 优先级: (从严重性映射)
  • 负责人: (来自当前用户)
  • 提交: (按提供)

第3步:创建问题

使用 mcp__YouTrack__create_issue,参数为:

text
project: KTIJ
summary: "Cherry-pick {KT-ID}: {KT摘要} 到 {目标版本}"
description: (见下方模板)
permittedGroups: ["jetbrains-team"]
customFields:
  Type: Task
  Priority: (映射值)
  State: Open
  Subsystems: ["IDE"]
  Planned for: ["{目标版本}"]
  Assignee: (当前用户登录名)

描述模板:

text
将修复 [{KT-ID}](https://youtrack.jetbrains.com/issue/{KT-ID}) 挑选到 IntelliJ {目标版本}。

**提交:** `{hash1}`、`{hash2}`、...

**原始问题:** {KT-ID} — {KT摘要}

第4步:添加标签

使用 mcp__YouTrack__manage_issue_tags 为创建的问题添加 Needs cherry-picking 标签。

第5步:链接问题

使用 mcp__YouTrack__link_issues 将KT问题链接为新KTIJ问题的前序步骤:

text
targetIssueId: {KTIJ-ID}
linkType: "previous step"
issueToLinkId: {KT-ID}

第6步:验证

通过 mcp__YouTrack__get_issue 获取创建的问题,确认所有字段正确。向用户报告问题ID和URL。