Skip to content

Webhook

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:

1
2
3
X-DAGsHub-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
X-DAGsHub-Event: push
X-DAGsHub-Signature: 1921679ed6274399b6514721056337f6913b6ff1cb35a24d340e983745d637f1
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
  "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"
  }
}