Skip to content

Return go-get info on subdirs. Fixes #15625 #15628

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

Closed
wants to merge 1 commit into from

Conversation

42wim
Copy link
Member

@42wim 42wim commented Apr 26, 2021

Return go-get info on subdirs, if we're not requesting "?go-get=1" return NotFound
Fixes #15625

@zeripath
Copy link
Contributor

hmm... I think we need to be clearer about when we want the go-get handler to fire.

Is it that any url:

/{something}/{something}?go-get=1

and

/{something}/{something}/**?go-get=1

all need to go to the go-get handler?

If so then we're better off making this a handler within web.WebRoutes

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 26, 2021
@42wim
Copy link
Member Author

42wim commented Apr 26, 2021

Afaik it needs to fire on all possible import paths.
So if you have import gitea/a/long/path/where/my/module/is it needs to respond on is

See also curl https://golang.org/x/tools/blah/blah/blah?go-get=1 for an example

@jolheiser
Copy link
Member

More or less, go-get needs to fire for pretty much any URL past user/repo.

Theoretically only real sub-directories within the repo matter, but it would likely be easier to just implement a wildcard and be done with it.

@6543 6543 added this to the 1.15.0 milestone Apr 27, 2021
zeripath added a commit to zeripath/gitea that referenced this pull request Apr 27, 2021
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 <[email protected]>
zeripath added a commit that referenced this pull request May 9, 2021


This PR is an alternative to #15628 and makes the go get handler a
handler.

Fix #15625

Close #15628

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this pull request May 14, 2021
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 <[email protected]>
zeripath added a commit that referenced this pull request May 15, 2021
Backport #15642

This PR is an alternative to #15628 and makes the go get handler a
handler.

Fix #15625

Close #15628

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: 6543 <[email protected]>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 10, 2021


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 <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

go get for modules in subdirs broken since 1.14.x
5 participants