Skip to content

Expose avatar_url in projects API

Created by: sue445

Add avatar_url to response of project API

For using avatar url from third party tools (ex. chrome-gitlab-notifier 😅)

example

curl -s http://localhost:3000/api/v3/projects/h5bp%2Fhtml5-boilerplate?private_token=xxxxxxxxxxxx | jq .
{
  "id": 8,
  "description": "Dolorem eum deserunt qui dolorum quia sapiente.",
  "default_branch": "master",
  "public": false,
  "archived": false,
  "visibility_level": 10,
  "ssh_url_to_repo": "sue445@localhost:h5bp/html5-boilerplate.git",
  "http_url_to_repo": "http://localhost:3000/h5bp/html5-boilerplate.git",
  "web_url": "http://localhost:3000/h5bp/html5-boilerplate",
  "name": "Html5 Boilerplate",
  "name_with_namespace": "H5bp / Html5 Boilerplate",
  "path": "html5-boilerplate",
  "path_with_namespace": "h5bp/html5-boilerplate",
  "issues_enabled": true,
  "merge_requests_enabled": true,
  "wiki_enabled": true,
  "snippets_enabled": false,
  "created_at": "2015-02-26T23:29:50.000Z",
  "last_activity_at": "2015-02-26T23:36:45.000Z",
  "namespace": {
    "id": 5,
    "name": "H5bp",
    "path": "h5bp",
    "owner_id": null,
    "created_at": "2015-02-26T23:29:50.000Z",
    "updated_at": "2015-02-26T23:29:50.000Z",
    "description": "Voluptatem cumque cupiditate suscipit.",
    "avatar": {
      "url": null
    }
  },
  "avatar_url": "http://localhost:3000/uploads/project/avatar/8/avatar.png",
  "permissions": {
    "project_access": null,
    "group_access": {
      "access_level": 50,
      "notification_level": 3
    }
  }
}

Merge request reports

Loading