Skip to content

Add GHCR package management to gh-CLI reference#93

Merged
CybotTM merged 2 commits into
mainfrom
retro-ghcr-package-scopes
Jun 24, 2026
Merged

Add GHCR package management to gh-CLI reference#93
CybotTM merged 2 commits into
mainfrom
retro-ghcr-package-scopes

Conversation

@CybotTM

@CybotTM CybotTM commented Jun 24, 2026

Copy link
Copy Markdown
Member

Why

When deleting a GHCR org container package via the API, the required token scopes are not obvious: admin:org alone is not sufficient, and delete:packages on its own still 403s. The deletion needs both read:packages and delete:packages. gh auth status can also lag behind the token's actual scopes, making the failure confusing to diagnose.

What

Adds a new Packages (GHCR) section to skills/github-project/references/gh-cli-reference.md, placed right after "Releases and Tags". It covers:

  • Listing org container packages
  • Inspecting a package (read:packages)
  • Deleting a package and the exact scope combination required (read:packages + delete:packages)
  • Verifying effective token scopes from the X-OAuth-Scopes response header rather than gh auth status

Reference file only — SKILL.md is untouched to stay under its word cap.

Deleting a GHCR org package needs BOTH read:packages and delete:packages;
admin:org alone is insufficient. Verify effective token scopes via the
X-OAuth-Scopes response header, since gh auth status can lag.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Copilot AI review requested due to automatic review settings June 24, 2026 08:21
@github-actions github-actions Bot added documentation Improvements or additions to documentation skill labels Jun 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new "Packages (GHCR)" section to the GitHub CLI reference guide, documenting commands for listing, inspecting, and deleting container packages, as well as verifying OAuth scopes. The review feedback suggests using -X DELETE instead of --method DELETE for consistency with other commands in the document, and querying the root API endpoint instead of a specific package endpoint to check effective OAuth scopes more reliably.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread skills/github-project/references/gh-cli-reference.md Outdated
Comment thread skills/github-project/references/gh-cli-reference.md Outdated
Address review feedback on GHCR package commands: use -X DELETE for
consistency with other -X flags in the reference, and query the root
API endpoint for X-OAuth-Scopes (always available, no placeholders).

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
@CybotTM CybotTM requested a review from Copilot June 24, 2026 11:12
@CybotTM CybotTM merged commit 4baabe2 into main Jun 24, 2026
18 of 19 checks passed
@CybotTM CybotTM deleted the retro-ghcr-package-scopes branch June 24, 2026 11:12
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants