This repository was archived by the owner on Sep 26, 2023. It is now read-only.
Conversation
Add a new endpoint to `ls` a directory to see all the files underneath. The files are returned as a JSON array of strings representing the relative paths of the files underneath the given directory. The result is non-recursive because otherwise there is an opportunity to DOS the server with a large response on a deep directory tree — it seems more unlikely that there is a directory with children directly under it large enough to break this but of course the risk there is also non-zero. The endpoint is `/repos/<name>/ls/<path>`.
424da85 to
254e61f
Compare
Get typesafety whilst passing paths around, rather than having stringly typed APIs. This is pretty straightforward a change because Serde handles this absolutely a-ok with no changes on our behalf — yay!
254e61f to
bd49d7f
Compare
Macro derives are provided, via proc macros, by actix for `Message` and `MessageResponse` which means we don't need _any_ of the duplicated boilerplate that was there! Awesome!
Codecov Report
@@ Coverage Diff @@
## master #46 +/- ##
==========================================
+ Coverage 83.02% 88.99% +5.96%
==========================================
Files 3 3
Lines 218 309 +91
==========================================
+ Hits 181 275 +94
+ Misses 37 34 -3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new endpoint to
lsa directory to see all the files underneath.The files are returned as a JSON array of strings representing the
relative paths of the files underneath the given directory.
The result is non-recursive because otherwise there is an opportunity to
DOS the server with a large response on a deep directory tree — it seems
more unlikely that there is a directory with children directly under it
large enough to break this but of course the risk there is also
non-zero.
The endpoint is
/repos/<name>/ls/<path>.