Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

extract-prs

БесплатноБез исполняемых скриптовНе проверен

Recursively extract GitHub Pull Request links from Jira issues

openshift-engот openshift-eng★ 123 звезды на GitHub14 установок в других каталогах

Об этом скилле

Jira Pull Request Extractor

This skill recursively discovers Jira issues and extracts all associated GitHub Pull Request links.

IMPORTANT FOR AI: This is a procedural skill - when invoked, you should directly execute the implementation steps defined in this document. Do NOT look for or execute external scripts (like extract_prs.py). Follow the step-by-step instructions in the "Implementation" section below.

When to Use This Skill

Use this skill when you need to:

  • Discover all GitHub PRs associated with a Jira feature and its subtasks
  • Extract PR metadata without analyzing PR content
  • Build a complete map of PRs for documentation or release notes

Key characteristics:

  • ✅ Always recursive: Automatically discovers all descendant issues via parent = KEY BFS
  • ✅ PR-only: Extracts only Pull Request URLs (ignores Issue and Commit URLs)
  • ✅ Dual-source: Extracts from both changelog remote links and text content (description/comments)
  • ✅ Structured output: Returns JSON with PR metadata and deduplication across sources

Prerequisites

  • MCP Jira server configured and running (required - see plugins/jira/README.md for setup)
  • jq installed for JSON parsing
  • GitHub CLI (gh) installed and authenticated for fetching PR metadata
  • User has read permissions for target Jira issues (including private issues via MCP authentication)
  • User has read access to linked GitHub repositories

Output Format

Purpose: This skill returns structured JSON that serves as an interface contract for consuming skills and commands.

Delivery Method:

  • Primary: Output JSON directly to the response (no file writes, no user prompts)
  • Secondary: Only save to .work/extract-prs/{issue-key}/output.json if user explicitly requests to save results

Schema Version: 1.0

Structure

{
  "schema_version": "1.0",
  "metadata": {
    "generated_at": "2025-11-24T10:30:00Z",
    "command": "extract_prs",
    "input_issue": "OCPSTRAT-1612"
  },
  "pull_requests": [
    {
      "url": "https://github.com/openshift/hypershift/pull/6444",
      "state": "MERGED",
      "title": "Add support for custom OVN subnets",
      "isDraft": false,
      "sources": ["comment", "description", "remote_link"],
      "found_in_issues": ["CNTRLPLANE-1201", "OCPSTRAT-1612"]
    }
  ]
}

Fields:

  • schema_version: Format version ("1.0")
  • metadata: Generation timestamp, command name, and input issue
  • pull_requests: Array of PR objects with url, state, title, isDraft, sources, and found_in_issues

Implementation

The skill operates in three main phases:

Phase 1: Descendant Issue Discovery

Discovers all descendant issues using parent = KEY JQL with BFS recursion.

Implementation:

  1. Fetch issue metadata via getJiraIssue with the issue key, requesting fields summary, description, issuetype, status. Fetch the issue's comments via listJiraIssueComments, paginating with startAt until isLast is true — getJiraIssue returns only a comment count.

    • Extract fields.description -- for text-based PR URL extraction
    • Extract comment bodies from listJiraIssueComments -- for PR URLs mentioned in comments
  2. Search for descendant issues using BFS via searchJiraIssuesUsingJql with jql: "parent = <issue-key>", fields: ["key"], and maxResults: 100. Recursively search parent = <child-key> for each result until no more children. Only fetch the key field here -- full data (including changelog) is fetched per-issue in Phase 2.

  3. Fetch full data for each issue (including root + all descendants) via getJiraIssue with fields summary, description, issuetype, status, plus its comments via listJiraIssueComments. This fetches description and comments. Excludes issue links (relates to, blocks, etc.) -- only parent-child relationships.

🔗 Phase 2: GitHub PR Extraction

Extracts PR URLs from two sources:

Source 1: Jira Remote Links (primary)

  • List the issue's remote links by calling executeRead with name: "listJiraIssueRemoteIssueLinks" and the issue key; extract GitHub PR URLs from each entry's object.url, matching https://github.com/{owner}/{repo}/pull/{number}, and deduplicate.
  • Store results in variables, not temporary files. Uses MCP authentication (no separate curl needed).
  • Fallback — changelog scan: fetch the issue with expand: "changelog" and extract remote-link entries from changelog.histories[].items[]. Note v2 changelogs encode remote links as RemoteWorkItemLink entries whose toString holds a shorthand title (owner/repo#number) with no full URL — parse that shorthand as well as the v1 RemoteIssueLink form.
  • Filters for GitHub PR URLs matching /pull/ or /pulls/ pattern

Source 2: Text Content (backup)

  • Searches both fields.description and the comment bodies from listJiraIssueComments (already fetched in Phase 1)
  • Description: Extract
Полный SKILL.md на GitHub

Установить extract-prs в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл extract-prs?

Recursively extract GitHub Pull Request links from Jira issues

Как установить скилл extract-prs?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл extract-prs запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить extract-prs с