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.

referencesprojects-api.md

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

Projects V2 API Reference (for Migration)

This reference covers the subset of the Projects V2 API needed for field migration: discovering project fields and reading item values.

List Project Fields

Via MCP Tool

mcp__github__projects_list(
  owner: "{org}",
  project_number: {n},
  method: "list_project_fields"
)

Via GraphQL

gh api graphql -f query='
  query {
    organization(login: "ORG") {
      projectV2(number: N) {
        fields(first: 30) {
          pageInfo { hasNextPage endCursor }
          nodes {
            ... on ProjectV2Field {
              id
              name
              dataType
            }
            ... on ProjectV2SingleSelectField {
              id
              name
              dataType
              options { id name }
            }
            ... on ProjectV2IterationField {
              id
              name
              dataType
            }
          }
        }
      }
    }
  }'

Field Data Types

dataType Description Migrates to
TEXT Free-form text text issue field
SINGLE_SELECT Dropdown with options single_select issue field
NUMBER Numeric value number issue field
DATE Date value date issue field
ITERATION Sprint/iteration cycles No equivalent (skip)

List Project Items (with field values)

Via MCP Tool

mcp__github__projects_list(
  owner: "{org}",
  project_number: {n},
  method: "list_project_items"
)

Returns paginated results. Each item includes:

  • Item type (ISSUE, DRAFT_ISSUE, PULL_REQUEST)
  • Content reference (repo owner, repo name, issue number)
  • Field values for all project fields

Via GraphQL

gh api graphql -f query='
  query($cursor: String) {
    organization(login: "ORG") {
      projectV2(number: N) {
        items(first: 100, after: $cursor) {
          pageInfo { hasNextPage endCursor }
          nodes {
            type
            content {
              ... on Issue {
                number
                repository { nameWithOwner }
              }
            }
            fieldValues(first: 20) {
              pageInfo { hasNextPage endCursor }
              nodes {
                ... on ProjectV2ItemFieldTextValue { text field { ... on ProjectV2Field { name } } }
                ... on ProjectV2ItemFieldSingleSelectValue { name field { ... on ProjectV2SingleSelectField { name } } }
                ... on ProjectV2ItemFieldNumberValue { number field { ... on ProjectV2Field { name } } }
                ... on ProjectV2ItemFieldDateValue { date field { ... on ProjectV2Field { name } } }
              }
            }
          }
        }
      }
    }
  }' -f cursor="$CURSOR"

Important Notes for Migration

  • Pagination: projects can have up to 10,000 items. Always paginate using pageInfo.hasNextPage and pageInfo.endCursor.
  • Draft items: items with type: DRAFT_ISSUE have no real issue attached. Skip these during migration.
  • Pull requests: items with type: PULL_REQUEST are PRs, not issues. Issue fields apply to issues only. Skip these.
  • Cross-repo: a single project can contain issues from many repositories. Group items by repo to batch repo ID lookups.
  • Field value access: each field value node type is different (ProjectV2ItemFieldTextValue, ProjectV2ItemFieldSingleSelectValue, etc.). Handle each type.

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.