Split Project out of Repository
The Repository model is an aggregation of two separate models:
- A VCS repository (id + forks)
- A software Project (everything else)
It would be sensible to split the two by creating a new Project model and simplify the Repository model.
So it would be ok for the receiver of the Repository message to assume that the id ( https://notabug.org/peers/forgefed.git for instance ) is suitable to use with the Git protocol and, for instance, run
git clone https://notabug.org/peers/forgefed.git?
In order to keep things simple, I think that we can make this assumption. The same URL will return the ActivityPub representation of the repository when it's queried with the usual AcitivyPub header (application/ld+json; profile="https://www.w3.org/ns/activitystreams).
I can see how some forges could use different URLs, for example by using different domains for their clone URLs, or by having aliases. It's a choice that we have to make. But if there is not a practical and immediate reason for considering it, I think we should probably go with the simpler option.
@fr33domlover what is your take on this?
Repository is only the VCS part, it doesn't refer to a whole project with issues and MRs and wikis etc. etc.
Project type because there's no need for it so far in S2S implementation logic; it's an abstract concept that seems to only limit flexibility; S2S implementation logic uses properties to find related objects, not types; perhaps a
Project type could be useful but I haven't seen a use case so far)
id of a
Repository is just the ActivityPub/RDF identifier URL, used for HTTPS-fetching the ActivityPub object. it's NOT the URI for git-cloning the repo.
There was a discussion somewhere (here? On the Feneas forum?) about the names of the properties that would specify the authenticated and the public clone URIs. If you can't find it here in any issue, maybe it was on the Feneas forum and that info is lost.... and then feel free to suggest property names for these URIs :P
@fr33domlover do we need to make the distinction about the HTTP URL and the clone URL? Can't we just use the same URL? Sending an ActivityPub request will respond with the JSON object and this will not interfer with any
git clone action.
On the other hand, repositories can have multiple clone URLs for different protocols so a property for this is probably needed anyway.
suggest property names for these URIs
What about :drum_roll: vcs ?
Or cloneUri? Seems more clear
Yes and also commonly used in API, +1 on cloneUri.
Deleting a branch is permanent. It CANNOT be undone. Continue?