Skip to content
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

x/pkgsite: redirect to code files if possible #48172

Open
changkun opened this issue Sep 3, 2021 · 0 comments
Open

x/pkgsite: redirect to code files if possible #48172

changkun opened this issue Sep 3, 2021 · 0 comments
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@changkun
Copy link
Member

changkun commented Sep 3, 2021

What is the URL of the page with the issue?

golang.org/pkg/runtime/proc.go
golang.org/x/build/dashboard/builders.go
...

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36

Screenshot

Screenshot 2021-09-03 at 10 37 27

Screenshot 2021-09-03 at 10 36 03

What did you do?

Access the page

What did you expect to see?

golang.org was capable of redirect to a specific source code if the path indicates the source, and the file indeed exists.

Such as the above two pages should redirect to:

cs.opensource.google/go/go/+/master:src/runtime/proc.go
cs.opensource.google/go/x/build/+/master:dashboard/builders.go

pkgsite should also be compatible with this redirect.

To further generalize the need, as pkgsite already knows files that are contained in a package and the original repository URL, if the request router matches a contained file, then redirects to the corresponding source code, instead of showing 404 or request a new package.

What did you see instead?

404 or request a new package

@gopherbot gopherbot added this to the Unreleased milestone Sep 3, 2021
@jamalc jamalc added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 3, 2021
@julieqiu julieqiu added the FeatureRequest Issues asking for a new feature that does not need a proposal. label Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants