Closed viktorix closed 2 years ago
1: We don't ask for a repository for each piece of software. We just ask for a download URL. So I don't see the problem: one developer's repo can house many individual code repos. 2 & 3: Good points.
For 2 & 3, we could just ask for the developer's username, e.g. KTS915, so that we can then check, e.g., https://api.github.com/search/repositories?q=KTS915/
Is GitHub Username the right label for this?
For 1, the repo we ask for during registration is simply for verification then? 2/3. I thought about it and search API might not be right because it does search database. So there is a possibility of an error for generic names. We could use rest API but it does require authentication, so we would need to add that. However, the API is very good:
For 1, the repo we ask for during registration is simply for verification then?
Yes.
Don't forget that there are as well Orgs, not just users, in GitHub.
For orgs, the url is something like https://api.github.com/orgs/{org}
This is for example the case for all "my" plugins I made for CP.
We can't use the second of the APIs @viktorix mentioned, as that requires authentication.
But the first one works well. It doesn't seem to matter if we're talking about an org's repo instead. I tried https://api.github.com/users/TukuToi
and still retrieved a meaningful value for repos_url
, so requiring a GitHub Username or Org name looks like the way to go.
Addressed by above commit. Will now add new issue to check that software submitted by this user has a repo under the same GitHub Username of Org name.
A couple of things:
KTS915/Test-ClassicPress-Directory
? EDIT: This could also be used for the form's software download link field.