Activities for following releases actor

Status: Experiment
History
On self-managed GitLab, by default this feature is not available. To make it available, an administrator can enable the feature flags named activity_pub and activity_pub_project. On GitLab.com and GitLab Dedicated, this feature is not available. This feature is not ready for production use.

This feature requires two feature flags:

  • activity_pub: Enables or disables all ActivityPub-related features.
  • activity_pub_project: Enables and disable ActivityPub features specific to projects. Requires the activity_pub flag to also be enabled.

Profile

The profile is this actor is a bit different from other actors. We don’t want to show activities for a given release, but instead the releases for a given project.

The profile endpoint is handled by Projects::ReleasesController#index on the list of releases, and should reply with something like this:

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "id": PROJECT_RELEASES_URL,
  "type": "Application",
  "name": PROJECT_NAME + " releases",
  "url": PROJECT_RELEASES_URL,
  "content": PROJECT_DESCRIPTION,
  "context": {
    "id": PROJECT_URL,
    "type": "Application",
    "name": PROJECT_NAME,
    "summary": PROJECT_DESCRIPTION,
    "url": PROJECT_URL,
  },
  "outbox": PROJECT_RELEASES_OUTBOX_URL,
  "inbox": null,
}

Outbox

The release actor is relatively simple: the only activity happening is the Create release event.

{
  "id": PROJECT_RELEASES_OUTBOX_URL#release_id,
  "type": "Create",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "actor": {
    "id": USER_PROFILE_URL,
    "type": "Person",
    "name": USER_NAME,
    "url": USER_PROFILE_URL,
  },
  "object": {
    "id": RELEASE_URL,
    "type": "Application",
    "name": RELEASE_TITLE,
    "url": RELEASE_URL,
    "content": RELEASE_DESCRIPTION,
    "context": {
      "id": PROJECT_URL,
      "type": "Application",
      "name": PROJECT_NAME,
      "summary": PROJECT_DESCRIPTION,
      "url": PROJECT_URL,
    },
  },
}