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

Build the User-Agent header from the assembly version

クローズ 初心者向け
#18 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp

調査の方向性

QuickbaseNet/Services/QuickbaseClient.cs の UserAgent 定数とコンストラクターの周辺を読み、続いて QuickbaseNet.UnitTests/Tests/QuickbaseClientTests.cs を読みます。指定どおり、ハードコードされたバージョンをアセンブリのバージョンに置き換え、新しいクライアントを使ってデフォルトの User-Agent ヘッダーを確認するテストを追加します。dotnet build と dotnet test --filter FullyQualifiedName~QuickbaseClientTests を実行します。5 つすべてのターゲット フレームワークがビルドされ、ヘッダーのテストが成功すれば完了です。

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

説明

bug good first issue

QuickbaseClient sends User-Agent: QuickbaseNet/1.0.1 on every request. The package is at 1.0.2, and release versions come from the git tag, so the hardcoded string goes stale with every release.

What to do

  • Replace the UserAgent constant with a value built from the assembly version: "QuickbaseNet/" + typeof(QuickbaseClient).Assembly.GetName().Version.ToString(3). ToString(3) gives 1.0.2 instead of 1.0.2.0, and it builds on every target, including netstandard2.0 and net48.
  • Add a test to QuickbaseClientTests that creates a client and checks client.Client.DefaultRequestHeaders.UserAgent.ToString(). It reads the header straight off the HttpClient, so no request or mock is needed. Use a new client, not the shared _client: that one replaces Client, which drops the headers set in the constructor.

Where to look

  • QuickbaseNet/Services/QuickbaseClient.cs, lines 18 and 46
  • QuickbaseNet.UnitTests/Tests/QuickbaseClientTests.cs

Done when

  • No version number is hardcoded in QuickbaseClient.cs
  • The new test asserts the header is QuickbaseNet/ plus the assembly's three-part version, and passes
  • dotnet build succeeds for all five target frameworks

Testing it

dotnet build
dotnet test --filter FullyQualifiedName~QuickbaseClientTests
主要言語
C#
スター
3
フォーク
2
平均マージ
3時間 14分
マージ済み PR(30日)
2

環境構築

はじめの一歩

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

hazeliscoding/quickbase-net のほかの issue

hazeliscoding/quickbase-net の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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