libgit2 / libgit2/libgit2sharp

Provide a machine-processable exception which is not based on strings

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

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

主要言語
C#
スター
3.5k
フォーク
925
PR マージ指標
30日以内にマージされた PR はありません

説明

When using LibGit2Sharp with a remote repository, sometimes errors occur. Those are throw as LibGit2SharpException. At this point these exceptions can only be distinguished from each other by the exception message.
Is there a way to get certain server responses like a 404 as HTTPStatusCode and not have to extract it from the message? For example, if the URL is incorrect (server exists, but path is not valid), a LibGit2SharpException is thrown which returns "invalid url, missing path" as a message. Here a HTTPStatusCode inside the Exception would be better suited to distinguish between different server responses and to react accordingly.

Version of LibGit2Sharp (release number or SHA1)

V0.26

Operating system(s) tested; .NET runtime tested

Windows 10; .NET 4.6

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

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

はじめの一歩

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

調査の方向性

まず、リモートリポジトリ操作がサーバーエラーを受け取ったときに LibGit2SharpException がどのように生成されるかを追跡します。特に、issue で説明されている無効な URL の例を確認してください。メッセージに依存せずに機械処理可能な HTTP ステータスを公開する方法を判断し、404 と無効なパスのレスポンスに対するカバレッジを追加します。呼び出し側がこれらのレスポンスをプログラムから区別できれば完了です。

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

評価

技術スタック
csharp, git
領域
api
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

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

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