Break apart Contents Abstraction
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với GithubRepo.get_contents và tài liệu GitHub Contents API được liên kết, sau đó lần theo các caller của nó để phân biệt mục đích sử dụng cho thư mục và tệp. Xác định hành vi riêng cho thư mục và tệp, bao gồm raw-media fallback cho các tệp từ 1MB đến 100MB; issue cũng yêu cầu quyết định xem có cần hỗ trợ các tệp lớn hơn 100MB hay không.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 0
- Merge trung bình
- 2 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 9
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của opensafely-core/osgithub
-
dependency-management
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
opensafely-core/osgithub#289 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
opensafely-core/osgithub#269 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
opensafely-core/osgithub#242 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
opensafely-core/osgithub#236 ·
-
`httpretty` looks unmaintained Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
opensafely-core/osgithub#230 · 1 bình luận ·
Tất cả issue của opensafely-core/osgithub
Issue tương tự
-
agent-ready documentation needs-triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Add https://search.jeremyh.xyz/ Đang mởinstance instance add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
searxng/searx-instances#939 · 1 bình luận ·
-
area-deployment area-integrations triage:bot-seen
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100