-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return go-get info on subdirs #15642
Conversation
This PR is an alternative to go-gitea#15628 and makes the go get handler a handler. Fix go-gitea#15625 Close go-gitea#15628 Signed-off-by: Andrew Thornton <art27@cantab.net>
"code.gitea.io/gitea/modules/context" | ||
"code.gitea.io/gitea/modules/setting" | ||
"code.gitea.io/gitea/modules/util" | ||
"github.com/unknwon/com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just because you're already fiddling here, maybe we could replace com.Expand
with os.Expand
? 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's doing something different from os.Expand.
It might be better to actually change this to use a go-template instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both are used to expand variables in strings. A template would also work.
It seems this still not resolve the sub dir problem. And I think with a test is better. |
@lunny what do you mean it does not resolve the subdir problem? What are you expecting and what are you testing? |
With this patch as it stands:
|
I like the refactor ... can we still get some simple tests ;) |
if you could tell me what this is actually supposed to return then a numbskull test would be possible but I don't understand whether it is doing the correct thing |
…into fix-15625-go-get-handler
Signed-off-by: Andrew Thornton <art27@cantab.net>
Test case added and conflicts resolved |
Codecov Report
@@ Coverage Diff @@
## main #15642 +/- ##
==========================================
- Coverage 43.97% 43.95% -0.03%
==========================================
Files 678 679 +1
Lines 82047 82051 +4
==========================================
- Hits 36081 36062 -19
- Misses 40082 40119 +37
+ Partials 5884 5870 -14
Continue to review full report at Codecov.
|
Make lgtm work |
Backport go-gitea#15642 This PR is an alternative to go-gitea#15628 and makes the go get handler a handler. Fix go-gitea#15625 Close go-gitea#15628 Signed-off-by: Andrew Thornton <art27@cantab.net>
This PR is an alternative to go-gitea#15628 and makes the go get handler a handler. Fix go-gitea#15625 Close go-gitea#15628 Signed-off-by: Andrew Thornton <art27@cantab.net>
This PR is an alternative to #15628 and makes the go get handler a
handler.
Fix #15625
Close #15628
Signed-off-by: Andrew Thornton art27@cantab.net