Break apart Contents Abstraction
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
GithubRepo.get_contents とリンク先の GitHub Contents API ドキュメントから始め、呼び出し元をたどってディレクトリとファイルの意図を区別します。ディレクトリとファイルでそれぞれ異なる動作を定義し、1MB から 100MB のファイルに対する raw-media fallback を含めます。この issue では、100MB を超えるファイルをサポートする必要があるかどうかも決定する必要があります。
索引モデルが issue の本文から書いたものです。
説明
We currently have GithubRepo.get_contents as an abstraction around GitHub's Contents API endpoint. However, this endpoint behaves differently depending on what you're asking it for, in particular:
- a directory
- a file
- a file whose size is between 1MB and 100MB
- a file whose size is above 100MB
The method tries to handle those all in one place and the flow suffers because of it.
Instead we should pick apart this abstraction into two, based on the caller's intent:
- a directory
- a file, with fallbacks for larger files
For instance, file content for files between 1MB and 100MB can be retrieved with the application/vnd.github.v3.raw custom media type (as the Accept header). Since we already want the metadata from the initial call (it's not provided with a raw call) this seems like a nice fallback. We can discuss whether we need to support retrieving file content which is >100MB.
- 主要言語
- Python
- スター
- 0
- フォーク
- 0
- 平均マージ
- 2日 20時間
- マージ済み PR(30日)
- 9
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
opensafely-core/osgithub のほかの issue
-
dependency-management
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
opensafely-core/osgithub#289 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
opensafely-core/osgithub#269 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
opensafely-core/osgithub#242 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
opensafely-core/osgithub#236 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
opensafely-core/osgithub#230 · コメント 1 件 ·
opensafely-core/osgithub の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stephrobert/dsoxlab#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sublimehq/package_control#1780 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nwg-piotr/nwg-displays#145 ·