Skip to content

Commit

Permalink
fix(hook): v25 nested response changes
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Oct 2, 2024
1 parent 6398280 commit aab5fde
Show file tree
Hide file tree
Showing 4 changed files with 323 additions and 33 deletions.
86 changes: 81 additions & 5 deletions content/reference/api/hook/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,93 @@ curl \

```json
{
"id": 1,
"repo_id": 1,
"build_id": 1,
"number": 1,
"id": 2,
"number": 2,
"source_id": "c8da1302-07d6-11ea-882f-4893bca275b8",
"created": "1563474076",
"host": "github.com",
"event": "push",
"branch": "main",
"error": "",
"status": "success",
"link": ""
"link": "",
"repo": {
"id": 1,
"user_id": 1,
"org": "github",
"name": "octocat",
"full_name": "github/octocat",
"link": "https://github.com/github/octocat",
"clone": "https://github.com/github/octocat.git",
"branch": "main",
"build_limit": 10,
"timeout": 60,
"counter": 0,
"visibility": "public",
"private": false,
"trusted": true,
"active": true,
"allow_pull": true,
"allow_push": true,
"allow_deploy": false,
"allow_tag": false,
"allow_comment": false,
"allow_events": {
"push": {
"branch": true,
"tag": true,
"delete_branch": false,
"delete_tag": false
},
"pull_request": {
"opened": false,
"edited": false,
"synchronize": false,
"reopened": false,
"labeled": false,
"unlabeled": false
},
"deployment": {
"created": true
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": false
}
},
"pipeline_type": "yaml"
},
"build": {
"id": 10,
"repo": {
"id": 1,
},
"number": 5,
"parent": 4,
"event": "push",
"status": "created",
"error": "",
"enqueued": 1563474204,
"created": 1563474204,
"started": 1563474204,
"finished": 0,
"deploy": "",
"clone": "https://github.com/github/octocat.git",
"source": "https://github.com/github/octocat/commit/48afb5bdc41ad69bf22588491333f7cf71135163",
"title": "push received from https://github.com/github/octocat",
"message": "Second commit...",
"commit": "48afb5bdc41ad69bf22588491333f7cf71135163",
"sender": "OctoKitty",
"author": "OctoKitty",
"branch": "main",
"ref": "refs/heads/main",
"base_ref": "",
"host": "ed95dcc0687c",
"runtime": "",
"distribution": ""
}
}
```
96 changes: 79 additions & 17 deletions content/reference/api/hook/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ curl \
[
{
"id": 2,
"repo_id": 1,
"build_id": 1,
"number": 2,
"source_id": "c8da1302-07d6-11ea-882f-4893bca275b8",
"created": "1563474076",
Expand All @@ -64,21 +62,85 @@ curl \
"branch": "main",
"error": "",
"status": "success",
"link": ""
},
{
"id": 1,
"repo_id": 1,
"build_id": 1,
"number": 1,
"source_id": "c8da1302-07d6-11ea-882f-4893bca275b8",
"created": "1563474076",
"host": "github.com",
"event": "push",
"branch": "main",
"error": "",
"status": "success",
"link": ""
"link": "",
"repo": {
"id": 1,
"user_id": 1,
"org": "github",
"name": "octocat",
"full_name": "github/octocat",
"link": "https://github.com/github/octocat",
"clone": "https://github.com/github/octocat.git",
"branch": "main",
"build_limit": 10,
"timeout": 60,
"counter": 0,
"visibility": "public",
"private": false,
"trusted": true,
"active": true,
"allow_pull": true,
"allow_push": true,
"allow_deploy": false,
"allow_tag": false,
"allow_comment": false,
"allow_events": {
"push": {
"branch": true,
"tag": true,
"delete_branch": false,
"delete_tag": false
},
"pull_request": {
"opened": false,
"edited": false,
"synchronize": false,
"reopened": false,
"labeled": false,
"unlabeled": false
},
"deployment": {
"created": true
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": false
}
},
"pipeline_type": "yaml"
},
"build": {
"id": 10,
"repo": {
"id": 1,
},
"number": 5,
"parent": 4,
"event": "push",
"status": "created",
"error": "",
"enqueued": 1563474204,
"created": 1563474204,
"started": 1563474204,
"finished": 0,
"deploy": "",
"clone": "https://github.com/github/octocat.git",
"source": "https://github.com/github/octocat/commit/48afb5bdc41ad69bf22588491333f7cf71135163",
"title": "push received from https://github.com/github/octocat",
"message": "Second commit...",
"commit": "48afb5bdc41ad69bf22588491333f7cf71135163",
"sender": "OctoKitty",
"author": "OctoKitty",
"branch": "main",
"ref": "refs/heads/main",
"base_ref": "",
"host": "ed95dcc0687c",
"runtime": "",
"distribution": ""
}
}
]
```
88 changes: 82 additions & 6 deletions content/reference/api/hook/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,93 @@ curl \

```json
{
"id": 1,
"repo_id": 1,
"build_id": 1,
"number": 1,
"id": 2,
"number": 2,
"source_id": "c8da1302-07d6-11ea-882f-4893bca275b8",
"created": "1563474076",
"host": "github.com",
"event": "push",
"branch": "main",
"error": "",
"status": "failure",
"link": ""
"status": "success",
"link": "",
"repo": {
"id": 1,
"user_id": 1,
"org": "github",
"name": "octocat",
"full_name": "github/octocat",
"link": "https://github.com/github/octocat",
"clone": "https://github.com/github/octocat.git",
"branch": "main",
"build_limit": 10,
"timeout": 60,
"counter": 0,
"visibility": "public",
"private": false,
"trusted": true,
"active": true,
"allow_pull": true,
"allow_push": true,
"allow_deploy": false,
"allow_tag": false,
"allow_comment": false,
"allow_events": {
"push": {
"branch": true,
"tag": true,
"delete_branch": false,
"delete_tag": false
},
"pull_request": {
"opened": false,
"edited": false,
"synchronize": false,
"reopened": false,
"labeled": false,
"unlabeled": false
},
"deployment": {
"created": true
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": false
}
},
"pipeline_type": "yaml"
},
"build": {
"id": 10,
"repo": {
"id": 1,
},
"number": 5,
"parent": 4,
"event": "push",
"status": "created",
"error": "",
"enqueued": 1563474204,
"created": 1563474204,
"started": 1563474204,
"finished": 0,
"deploy": "",
"clone": "https://github.com/github/octocat.git",
"source": "https://github.com/github/octocat/commit/48afb5bdc41ad69bf22588491333f7cf71135163",
"title": "push received from https://github.com/github/octocat",
"message": "Second commit...",
"commit": "48afb5bdc41ad69bf22588491333f7cf71135163",
"sender": "OctoKitty",
"author": "OctoKitty",
"branch": "main",
"ref": "refs/heads/main",
"base_ref": "",
"host": "ed95dcc0687c",
"runtime": "",
"distribution": ""
}
}
```
Loading

0 comments on commit aab5fde

Please sign in to comment.