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

Proposal: Make preview features configurable

オープン
#999 コメント 17 件 リアクション 1 件 担当者 0 名 GitHub で見る

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
go
領域
api

調査の方向性

まず、デフォルトの preview Accept ヘッダーと ListOptions がどのように処理されるかを追跡します。issue にはファイルもテストも記載されていません。RequestOptions API を定義し、新しい API で preview ヘッダーをどのように扱うべきかを明確にしたうえで、repository-list リクエストから不要なヘッダーを省略できることを確認します。

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

説明

NeedsInvestigation

Problem

A project I'm working on has an issue where a list of repos is returning a Server Error due to an additional Accept header being added (The "mediaTypeCodesOfConductPreview" header).

Removing this header fixes the problem but I can't do this with the current library implementation.

Solution

Instead of adding these headers by default, we could move them to an Options parameter similar to ListOptions.

type RequestOptions {
  acceptHeaders []string
}
Pros
  • Allows developers to control which headers to add (including headers the library may not control)
  • Removes the maintenance of adding / removing headers from library owners
  • Opens the door for any additional request options in the future.
  • This will remove the need for comments like // TODO: remove custom Accept headers when APIs fully launch.
Cons
  • Forces users to care about headers
    • While a con, users should know if a feature they are using is preview or not and subject to change

Concerns

The only major concern I have with this is approach is that it gets fuzzy what to do with entirely new API's (for example the checks API).

For consistency the API could still require the developer to add the header.
For a sane API the API could add the header with the expectation that the header is removed as soon as possible, but again moves the burden on to the library.

主要言語
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 を短くまとめたダイジェスト。