搜索

PythonReactSEOPDF
GitHub Skill

github-metadata

manage custom issue fields, metadata schemas, and early-access REST API features

Z1-Test☆ 0 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

GitHub Metadata

What is it?

The Metadata Skill handles advanced and "hidden" GitHub features, specifically focusing on Issue Custom Fields and attributes accessible via the Issue Fields REST API.

Success Criteria

  • Custom field values are accurately read or updated.
  • Numeric IDs for fields and repositories are resolved BEFORE API calls.
  • API calls use the correct Accept headers and JSON payloads.
  • No assumptions are made about existing field values.

Why use it?

  • Advanced customization: Access GitHub's early-access custom fields API
  • Flexible metadata: Manage custom properties beyond standard issue fields
  • Dynamic resolution: Handles complex ID lookups for fields and repositories
  • Future-proof: Leverages cutting-edge GitHub features before MCP support
  • Precise control: Direct REST API access for fine-grained metadata operations

When to use this skill

  • "Get the value of the 'Priority' custom field for issue #10."
  • "Set the 'Target Date' field on this issue."
  • "What are the available custom fields in this organization?"

What this skill can do

  • Discovery: List available issue fields in an organization (GET /orgs/{org}/issue-fields).
  • Read: Fetch values of specific custom fields on an issue.
  • Write: Update custom field values using raw REST calls.

What this skill will NOT do

  • Manage standard metadata (assignees) - use github-issues.
  • Create fields (admin task, though supported by API).

How to use this skill

  1. Resolve IDs: Use gh repo view and field discovery to get numeric IDs. Writing values REQUIRES these IDs.
  2. Check MCP: Ensure issue_read doesn't already return the field.
  3. Construct API Call: Use gh api with the endpoints defined in ISSUE_FIELDS_API.md.
  4. Authentication: Ensure the token has repo and organization scopes.

Tool usage rules

  • Statelessness: Always resolve IDs dynamically; do not hardcode field or repository IDs.
  • REST Essential: This skill relies heavily on the run_command tool to execute gh api using the REST endpoints. Note: MCP tools do not currently support the Issue Fields Early Access API.
  • Header: Accept: application/vnd.github+json is mandatory for these endpoints.
  • IDs: Writing values REQUIRES the numeric field_id (from Discovery) and repository_id.

Examples

See field-payload-examples.json for concrete payloads and expected outcomes.

Listing Fields
# Get all defined fields for the org
gh api /orgs/my-org/issue-fields
Setting a Field Value
# 1. Get Repo ID
REPO_ID=$(gh repo view my-org/my-repo --json id -q .id)

# 2. Set Value (Field ID 123 = Priority, Value = "High")
gh api --method PUT /repositories/$REPO_ID/issues/42/issue-field-values \
  -f issue_field_values='[{"field_id": 123, "value": "High"}]'

Limitations

  • Requires numeric IDs for fields and repositories.
  • Early Access API is subject to change.

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!