All skills
github avatar

/issue-fields-migration

@f7a0d97 official
by githubgithub/awesome-copilot40k stars
5,040

Bulk-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 project field values to issue fields", or ask about adopting issue fields. Issue fields are org-level typed metadata (single select, text, number, date) that replace label-based workarounds with structured, searchable, cross-repo fields.

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/issue-fields-migration

This session only. Nothing lands on disk.

referencesissue-fields-api.md

≈834 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Issue Fields REST API Reference

Issue fields are org-level custom metadata for issues. All endpoints require the API version header:

-H "X-GitHub-Api-Version: 2026-03-10"

List Org Issue Fields

gh api /orgs/{org}/issue-fields \
  -H "X-GitHub-Api-Version: 2026-03-10"

Returns an array of field objects:

[
  {
    "id": "IF_abc123",
    "name": "Priority",
    "content_type": "single_select",
    "options": [
      { "id": "OPT_1", "name": "Critical" },
      { "id": "OPT_2", "name": "High" },
      { "id": "OPT_3", "name": "Medium" },
      { "id": "OPT_4", "name": "Low" }
    ]
  },
  {
    "id": "IF_def456",
    "name": "Due Date",
    "content_type": "date",
    "options": null
  }
]

Field types: text, single_select, number, date

Useful jq filter:

gh api /orgs/{org}/issue-fields \
  -H "X-GitHub-Api-Version: 2026-03-10" \
  --jq '.[] | {id, name, content_type, options: [.options[]?.name]}'

Read Issue Field Values

gh api /repos/{owner}/{repo}/issues/{number}/issue-field-values \
  -H "X-GitHub-Api-Version: 2026-03-10"

Returns the current field values for the issue. Use this to check whether a value already exists before writing.

Write Issue Field Values (POST, additive)

Adds values to an issue without removing existing values for other fields.

Important: uses repository_id (integer), not owner/repo.

# First, get the repository ID:
REPO_ID=$(gh api /repos/{owner}/{repo} --jq .id)

# Then write the value:
echo '[
  {
    "field_id": "IF_abc123",
    "value": "High"
  }
]' | gh api /repositories/$REPO_ID/issues/{number}/issue-field-values \
  -X POST \
  -H "X-GitHub-Api-Version: 2026-03-10" \
  --input -

Value format by field type

Field Type value format Example
text String "value": "Some text"
single_select Option name (string) "value": "High"
number Number "value": 42
date ISO 8601 date string "value": "2025-03-15"

Key: for single_select, the REST API accepts the option name as a string. You do not need to look up option IDs.

Writing multiple fields at once

Pass multiple objects in the array to set several fields in a single call:

echo '[
  {"field_id": "IF_abc123", "value": "High"},
  {"field_id": "IF_def456", "value": "2025-06-01"}
]' | gh api /repositories/$REPO_ID/issues/{number}/issue-field-values \
  -X POST \
  -H "X-GitHub-Api-Version: 2026-03-10" \
  --input -

Write Issue Field Values (PUT, replace all)

Replaces all field values on the issue. Use with caution.

echo '[{"field_id": "IF_abc123", "value": "Low"}]' | \
  gh api /repositories/$REPO_ID/issues/{number}/issue-field-values \
    -X PUT \
    -H "X-GitHub-Api-Version: 2026-03-10" \
    --input -

Warning: PUT removes any field values not included in the request body. Always use POST for migrations to preserve other field values.

Permissions

  • Repository: "Issues" read/write
  • Organization: "Issue Fields" read/write

Rate Limiting

  • Standard rate limits apply (5,000 requests/hour for authenticated users)
  • Secondary rate limits may trigger for rapid sequential writes
  • Recommended: 100ms delay between calls, exponential backoff on 429

Source: SKILL.md on GitHub

1 alert16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides a secure and structured workflow for migrating GitHub labels and Project V2 fields to Issue Fields. It utilizes the official GitHub CLI and incorporates critical security best practices including human-in-the-loop confirmations, detailed dry-run previews, and conflict resolution strategies. All network activity is restricted to GitHub's official API, and no malicious patterns or obfuscation were detected.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: MEDIUM · 1 issue

  • Runlayer6mo

    2/4 files flagged

  • ZeroLeaks5mo

    1 finding · Score: 69/100

Signed by skilld at f7a0d97. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 17 hours ago.

Activeupdated 7 months ago
  • github
  • github-api
  • issue-fields
  • labels
  • migrations
  • project-management
  • metadata
  • bulk-operations

README badge

README badge for github/awesome-copilot/issue-fields-migration

Bulk-migrates metadata into GitHub org-level issue fields from repo labels or Project V2 fields. Supports mapping labels like `p0`, `p1`, `bug` to structured single-select issue fields, and copying Project field values to org fields, with conflict detection and optional label cleanup.

Generated from the current SKILL.md.

Can this migrate labels from multiple repos at once?
Yes. You specify which repos to migrate from, and the skill will handle label discovery and migration across all of them in a single workflow.
What happens if an issue already has a value in the target issue field?
The skill skips that issue during migration to avoid overwriting existing values.
Does this work with both labels and project fields?
Yes. The skill supports migrating from repo labels to issue fields or from Project V2 fields to org-level issue fields. You specify the source when you start.
What if an issue has multiple labels that map to the same issue field?
The skill detects this conflict and asks you to choose a resolution strategy: use the first match, skip the issue, or decide case by case.
Can the skill remove labels after migrating them to issue fields?
Yes. After setting the issue field values, you can optionally have the skill remove the migrated labels from each issue.

Generated from the current SKILL.md. These answers refresh after source changes.