ecosyste-ms / repos

An open API service providing repository metadata for many open source software ecosystems.
https://repos.ecosyste.ms
GNU Affero General Public License v3.0
9 stars 1 forks source link

Is there any way to detect a repository transfer? #590

Open jamietanna opened 4 months ago

jamietanna commented 4 months ago

While digging into https://gitlab.com/tanna.dev/dependency-management-data/-/issues/599 I noticed that DMD, which uses Ecosyste.ms doesn't detect a Buidlkite plugin correctly (more info: https://github.com/ecosyste-ms/packages/issues/816).

When looking at the package https://github.com/chronotc/monorepo-diff-buildkite-plugin, via https://packages.ecosyste.ms/api/v1/packages/lookup?purl=pkg:github/chronotc%2Fmonorepo-diff-buildkite-plugin we can see some GitHub metadata for the repo.

What's interesting is that if you load https://github.com/chronotc/monorepo-diff-buildkite-plugin you'll see that the repo has been transferred between orgs.

(This repo has also been at monebag/monorepo-diff in the past)

Is there any way to surface this information in Ecosyste.ms?

andrew commented 4 months ago

The repos service has a concept of previous_names which get recorded when a name change is detected, see https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adikari%2Fmonorepo-diff-buildkite-plugin it's got the previous name listed.

https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronotc%2Fmonorepo-diff-buildkite-plugin also redirects to the correct name.

When it comes to looking up by purl of the previous package name, I'm not sure what the best defined behaviour should be there, as the name happens to look like a url, but it's tricky to know how each package manager handles it.

Do you know how go proxy handles redirects and renames?