github-labels-query

द्वारा github

प्रति पृष्ठ पेजिनेशन समर्थन के साथ GitHub रिपॉजिटरी लेबल सूचीबद्ध करें।

npx skills add https://github.com/github/gh-aw --skill github-labels-query

GitHub Labels Query Skill

List GitHub repository labels with efficient pagination using the --per-page flag.

Usage

Use this script to list labels from any repository with controlled page sizes.

Basic Usage

./query-labels.sh --owner github --repo gh-aw
# Returns 10 labels (default per_page=10)

Pagination

# Get the first label only
./query-labels.sh --owner github --repo gh-aw --per-page 1

# Get 25 labels starting from page 2
./query-labels.sh --owner github --repo gh-aw --per-page 25 --page 2

Filtering by name

# Only labels whose name contains "bug" (case-insensitive)
./query-labels.sh --owner github --repo gh-aw --name-filter bug

When --name-filter is set, all labels are fetched and filtered, then --per-page/--page are applied to the filtered results.

Parameters

ParameterRequiredDefaultDescription
--ownerYes-Repository owner (username or organization)
--repoYes-Repository name
--per-pageNo10Results per page (1–100)
--pageNo1Page number
--name-filterNo-Case-insensitive substring filter on the label name

Output

Returns JSON with the following fields:

{
  "labels": [
    {
      "id": 12345,
      "node_id": "LA_...",
      "url": "https://api.github.com/repos/owner/repo/labels/bug",
      "name": "bug",
      "color": "d73a4a",
      "default": true,
      "description": "Something isn't working"
    }
  ],
  "item_count": 10,
  "per_page": 10,
  "page": 1
}

Source

Calls the GitHub REST API: GET /repos/{owner}/{repo}/labels?per_page={n}&page={n}

When --name-filter is used, the script pages through all labels (--paginate) before filtering and slicing locally.

github की और Skills

console-rendering
github
Go में struct टैग-आधारित कंसोल रेंडरिंग सिस्टम का उपयोग करने के निर्देश
official
github-pr-query
github
jq तर्क समर्थन के साथ GitHub पुल अनुरोधों को कुशलतापूर्वक क्वेरी करें
official
jqschema
github
JSON डेटा से संरचना और प्रकार की जानकारी निकालने वाली JSON स्कीमा खोज उपयोगिता
official
gh-agent-session
github
GitHub CLI एजेंट सत्र विस्तार
official
gh-agent-task
github
GitHub CLI एजेंट कार्य विस्तार
official
github-copilot-agent-tips-and-tricks
github
GitHub Copilot Agent PRs के साथ काम करने के लिए टिप्स और ट्रिक्स
official
rust-coding-skill
github
Use this skill whenever editing `*.rs` files in the `rust/` SDK in order to write idiomatic, efficient, well-structured Rust code
official
ai-ready
github
किसी भी रिपॉजिटरी को AI-तैयार बनाएं — आपके कोडबेस का विश्लेषण करता है और AGENTS.md, copilot-instructions.md, CI वर्कफ़्लो, इश्यू टेम्पलेट और अधिक जनरेट करता है। आपकी PR समीक्षा को माइन करता है…
official