Skip to content

Webhooks

DagsHub supports web hooks for repository events; you can find it in the settings page (/:username/:reponame/settings/hooks). All event pushes are POST requests, and we currently support three versions of formats: DagsHub, Slack, and Discord.

Event information

The following shows an example of event information that will be sent by DagsHub to the Payload URL:

X-DagsHub-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
X-DagsHub-Event: push
X-DagsHub-Signature: 1921679ed6274399b6514721056337f6913b6ff1cb35a24d340e983745d637f1
{
  "ref": "refs/heads/master",
  "before": "e298f700fa942a238fbcaf9faf3ef2e781565507",
  "after": "e298f700fa942a238fbcaf9faf3ef2e781565507",
  "compare_url": "",
  "commits": [
    {
      "id": "e298f700fa942a238fbcaf9faf3ef2e781565507",
      "message": "Added Apache 2.0 license\n",
      "url": "https://dagshub.com/DagsHub-Official/DagsHub-Tutorial-MNIST/commit/e298f700fa942a238fbcaf9faf3ef2e781565507",
      "author": {
        "name": "DagsHub-Official",
        "email": "dags@dagshub.com",
        "username": "DagsHub-Official"
      },
      "committer": {
        "name": "DagsHub-Official",
        "email": "dags@dagshub.com",
        "username": "DagsHub-Official"
      },
      "added": [
        "LICENSE"
      ],
      "removed": [],
      "modified": [],
      "timestamp": "0001-01-01T00:00:00Z"
    }
  ],
  "repository": {
    "id": 6,
    "owner": {
      "id": 6,
      "login": "DagsHub-Official",
      "full_name": "",
      "email": "dags@dagshub.com",
      "avatar_url": "https://dagshub.com/avatars/6",
      "username": "DagsHub-Official"
    },
    "name": "DagsHub-Tutorial-MNIST",
    "full_name": "DagsHub-Official/DagsHub-Tutorial-MNIST",
    "description": "A repo for the tutorial explaining the benefits of DVC and DagsHub, using digit classification based on the MNIST database as an example problem",
    "private": false,
    "fork": false,
    "parent": null,
    "empty": false,
    "mirror": false,
    "size": 245760,
    "html_url": "https://dagshub.com/DagsHub-Official/DagsHub-Tutorial-MNIST",
    "clone_url": "https://dagshub.com/DagsHub-Official/DagsHub-Tutorial-MNIST.git",
    "website": "",
    "stars_count": 0,
    "forks_count": 0,
    "watchers_count": 1,
    "open_issues_count": 0,
    "default_branch": "master",
    "created_at": "2019-01-08T13:28:51Z",
    "updated_at": "2019-01-09T15:57:48Z"
  },
  "pusher": {
    "id": 6,
    "login": "DagsHub-Official",
    "full_name": "",
    "email": "dags@dagshub.com",
    "avatar_url": "https://dagshub.com/avatars/6",
    "username": "DagsHub-Official"
  },
  "sender": {
    "id": 6,
    "login": "DagsHub-Official",
    "full_name": "",
    "email": "dags@dagshub.com",
    "avatar_url": "https://dagshub.com/avatars/6",
    "username": "DagsHub-Official"
  }
}