Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

InstallationPermissions is missing organization_private_registries

オープン 初心者向け
#4,590 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
api

調査の方向性

この issue は github/apps.go 内、特に InstallationPermissions 構造体に関するものです。既存のフィールドとその順序を確認してください。正しい JSON タグを付けて 'OrganizationPrivateRegistries' フィールドを追加します。GitHub API ドキュメントでパーミッションキーを確認して検証してください。構造体が正しくマーシャル/アンマーシャルされることを確認するためにテストを実行してください。

索引モデルが issue の本文から書いたものです。

説明

Summary

InstallationPermissions in github/apps.go has no field for the organization_private_registries
App permission, so callers cannot read it off an installation and cannot request it when scoping
down an installation access token.

Detail

The endpoints it governs are already supported: github/private_registries.go, added in #3785 and
extended for OIDC in #4159. The permission itself is not modelled.

GitHub returns the key today. GET /orgs/{org}/installations includes it in an installation's
permissions map for any App that holds it:

"permissions": {
  "organization_private_registries": "read"
}

The REST documentation for the private registries endpoints also names it, in the
"Fine-grained access tokens for ..." section of each endpoint, as "Organization private registries"
organization permissions
, with GitHub App installation access tokens listed as supported:
https://docs.github.com/en/rest/private-registries/organization-configurations

Two consequences of the missing field:

  • The value is silently dropped when an installation is unmarshalled, so
    Installation.GetPermissions() cannot report it.
  • Apps.CreateInstallationToken cannot request it via InstallationTokenOptions.Permissions, so
    Go code cannot mint a token narrowed to private registries. Callers have to fall back to an
    untyped request that builds the permissions JSON by hand.

Checked on master and on v92.0.0. Alphabetically the field belongs between
OrganizationPreReceiveHooks and OrganizationProjects.

One note for anyone checking this against the published schema: the app-permissions schema in
octokit/openapi has no occurrence of private_registr at all. That schema also omits
organization_dependabot_secrets, which this struct already carries, so its omission is a gap in
the schema rather than evidence that the permission does not exist.

Proposed fix

Add the field and its generated accessor. I am planning to work on this and will open a PR.

主要言語
Go
スター
11.3k
フォーク
2.5k
平均マージ
1日 16時間
マージ済み PR(30日)
51

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

google/go-github のほかの issue

google/go-github の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。