feat: Add repo download contents sentinel errors#4192
Conversation
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4192 +/- ##
=======================================
Coverage 93.71% 93.71%
=======================================
Files 209 209
Lines 19770 19772 +2
=======================================
+ Hits 18527 18529 +2
Misses 1046 1046
Partials 197 197 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @stevehipwell!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
cc: @alexandear - @zyfy29 - @Not-Dhananjay-Mishra - @munlicode
|
Thank you, @Not-Dhananjay-Mishra! |
@stevehipwell - this is now released here: |
This PR adds Sentinel errors to the
RepositoriesService.DownloadContents&RepositoriesService.DownloadContentsWithMetafunctions. This is a follow-up to #4153 that improves the ergonomics. These sentinels are required to correctly handle the different paths in these functions without falling back to writing logic against the error messages which is brittle (and are changing in the next release).@gmlewis since working on #4153 I've found more issues with the pattern it replaced such as always returning
fileas the type for a submodule due to the directory loop pattern and a "bug" in the 2022 API version. This combined with a lack of Sentinel errors makes using the current released version painful, would it be possible to get a release out once this PR is merged?