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

npm registry package metadata endpoint should return repository field #23444

Closed
viceice opened this issue Mar 13, 2023 · 1 comment · Fixed by #23539
Closed

npm registry package metadata endpoint should return repository field #23444

viceice opened this issue Mar 13, 2023 · 1 comment · Fixed by #23539
Assignees
Labels
topic/packages type/enhancement An improvement of existing functionality

Comments

@viceice
Copy link
Contributor

viceice commented Mar 13, 2023

Description

Looks like this function doesn't return the repository field, so it's empty insite reponses

return &npm_module.PackageMetadata{
ID: latest.Package.Name,
Name: latest.Package.Name,
DistTags: distTags,
Description: metadata.Description,
Readme: metadata.Readme,
Homepage: metadata.ProjectURL,
Author: npm_module.User{Name: metadata.Author},
License: metadata.License,
Versions: versions,
}

Would be nice to return the repository url, so bots like renovate can use that to find the source repository.

Gitea Version

1.18.5

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Linux

How are you running Gitea?

docker uimage via official helm chart

Database

PostgreSQL

@KN4CK3R KN4CK3R added type/enhancement An improvement of existing functionality topic/packages and removed type/bug labels Mar 13, 2023
@Zettat123 Zettat123 self-assigned this Mar 17, 2023
techknowlogick pushed a commit that referenced this issue Mar 17, 2023
Close #23444 

Add `Repository` to npm package `Metadata` struct so the `repository` in
`package.json` can be stored and be returned in the endpoint.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
@viceice
Copy link
Contributor Author

viceice commented Mar 17, 2023

thank you for fast resolve 💖

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/packages type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants