$npx -y skills add github/awesome-copilot --skill issue-fields-migrationBulk-migrate metadata to GitHub issue fields from two sources: repo labels (e.g. priority labels to a Priority field) and Project V2 fields. Use when users say "migrate my labels to issue fields", "migrate project fields to issue fields", "convert labels to issue fields", "copy p
| 1 | # Issue Fields Migration |
| 2 | |
| 3 | [Issue fields](https://github.blog/changelog/2026-03-12-issue-fields-structured-issue-metadata-is-in-public-preview/) are org-level typed metadata (single select, text, number, date) that replace label-based workarounds with structured, searchable, cross-repo fields. Every organization gets `Priority`, `Effort`, `Start date`, and `Target date` preconfigured, with support for up to 25 custom fields. |
| 4 | |
| 5 | This skill bulk-migrates existing metadata into issue fields from two sources: |
| 6 | |
| 7 | - **Repo labels**: Convert labels like `p0`, `p1`, `priority/high` into structured issue field values (e.g. the Priority field). Supports migrating multiple labels at once and optionally removing them after migration. |
| 8 | - **Project V2 fields**: Copy field values (single select, text, number, date, iteration) from a GitHub Project into the equivalent org-level issue fields. |
| 9 | |
| 10 | ## When to Use |
| 11 | |
| 12 | - User added org-level issue fields that overlap with existing project fields |
| 13 | - User wants to copy values from project fields to issue fields before deleting the old project fields |
| 14 | - User asks about "migrating", "transferring", or "copying" project field data to issue fields |
| 15 | - User wants to convert repo labels (e.g., p0, p1, p2, p3) into issue field values (e.g., Priority field) |
| 16 | - User asks about replacing labels with issue fields or cleaning up labels after adopting issue fields |
| 17 | |
| 18 | ## Prerequisites |
| 19 | |
| 20 | - The target org must have issue fields enabled |
| 21 | - The issue fields must already exist at the org level |
| 22 | - For project field migration: issue fields must be added to the project |
| 23 | - For label migration: labels must exist on the target repo(s) |
| 24 | - The user must have write access to the repos (and project, if migrating project fields) |
| 25 | - `gh` CLI must be authenticated with appropriate scopes |
| 26 | |
| 27 | ## Available Tools |
| 28 | |
| 29 | ### MCP Tools (read operations) |
| 30 | |
| 31 | | Tool | Purpose | |
| 32 | |------|---------| |
| 33 | | `mcp__github__projects_list` | List project fields (`list_project_fields`), list project items with values (`list_project_items`) | |
| 34 | | `mcp__github__projects_get` | Get details of a specific project field or item | |
| 35 | |
| 36 | ### CLI / REST API |
| 37 | |
| 38 | | Operation | Command | |
| 39 | |-----------|---------| |
| 40 | | List org issue fields | `gh api /orgs/{org}/issue-fields -H "X-GitHub-Api-Version: 2026-03-10"` | |
| 41 | | Read issue field values | `gh api /repos/{owner}/{repo}/issues/{number}/issue-field-values -H "X-GitHub-Api-Version: 2026-03-10"` | |
| 42 | | Write issue field values | `gh api /repositories/{repo_id}/issues/{number}/issue-field-values -X POST -H "X-GitHub-Api-Version: 2026-03-10" --input -` | |
| 43 | | Get repository ID | `gh api /repos/{owner}/{repo} --jq .id` | |
| 44 | | List repo labels | `gh label list -R {owner}/{repo} --limit 1000 --json name,color,description` | |
| 45 | | List issues by label | `gh issue list -R {owner}/{repo} --label "{name}" --state all --json number,title,labels --limit 1000` | |
| 46 | | Remove label from issue | `gh api /repos/{owner}/{repo}/issues/{number}/labels/{label_name} -X DELETE` | |
| 47 | |
| 48 | See [references/issue-fields-api.md](references/issue-fields-api.md), [references/projects-api.md](references/projects-api.md), and [references/labels-api.md](references/labels-api.md) for full API details. |
| 49 | |
| 50 | ## Workflow |
| 51 | |
| 52 | ### Step 0: Migration Source |
| 53 | |
| 54 | Ask the user what they are migrating: |
| 55 | |
| 56 | 1. **"Are you migrating labels or project fields?"** |
| 57 | - **Labels**: proceed to the [Label Migration Flow](#label-migration-flow) below. |
| 58 | - **Project fields**: proceed to the [Project Field Migration Flow](#project-field-migration-flow) below. |
| 59 | |
| 60 | 2. If the user says **labels**: |
| 61 | - Ask: "Which org and repo(s) contain the labels?" |
| 62 | - Ask: "Which labels do you want to migrate?" (they can name them or say "show me the labels first") |
| 63 | |
| 64 | 3. If the user says **project fields**: |
| 65 | - Ask: "Can you share the link to your project or tell me the org name and project number?" |
| 66 | - Ask: "Which field do you want to migrate?" |
| 67 | |
| 68 | --- |
| 69 | |
| 70 | ### Label Migration Flow |
| 71 | |
| 72 | Use this flow when the user wants to convert repo labels into issue field values. Labels can only map to `single_select` issue fields (each label name maps to one option value). |
| 73 | |
| 74 | #### Phase L1: Input & Label Discovery |
| 75 | |
| 76 | 1. Ask the user for: **org name** and **repo(s)** to migrate. |
| 77 | 2. Fetch labels from each repo: |
| 78 | |
| 79 | ```bash |
| 80 | gh label list -R {owner}/{repo} --limit 1000 --json name,color,description |
| 81 | ``` |
| 82 | |
| 83 | 3. Fetch org issue fields: |
| 84 | |
| 85 | ```bash |
| 86 | gh api /orgs/{org}/issue-fields \ |
| 87 | -H "X-GitHub-Api-Version: 2026-03-10" \ |
| 88 | --jq '.[] | |