From aab5fde0b82a4673d88853a85ba6e969aee2e789 Mon Sep 17 00:00:00 2001 From: davidvader Date: Wed, 2 Oct 2024 09:02:48 -0500 Subject: [PATCH] fix(hook): v25 nested response changes --- content/reference/api/hook/add.md | 86 +++++++++++++++++++++++-- content/reference/api/hook/get.md | 96 +++++++++++++++++++++++----- content/reference/api/hook/update.md | 88 +++++++++++++++++++++++-- content/reference/api/hook/view.md | 86 +++++++++++++++++++++++-- 4 files changed, 323 insertions(+), 33 deletions(-) diff --git a/content/reference/api/hook/add.md b/content/reference/api/hook/add.md index 7686aa16f..8bf0136f4 100644 --- a/content/reference/api/hook/add.md +++ b/content/reference/api/hook/add.md @@ -67,10 +67,8 @@ 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", @@ -78,6 +76,84 @@ curl \ "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": "" + } } ``` diff --git a/content/reference/api/hook/get.md b/content/reference/api/hook/get.md index 77e4bc81e..6a32bcff3 100644 --- a/content/reference/api/hook/get.md +++ b/content/reference/api/hook/get.md @@ -54,8 +54,6 @@ curl \ [ { "id": 2, - "repo_id": 1, - "build_id": 1, "number": 2, "source_id": "c8da1302-07d6-11ea-882f-4893bca275b8", "created": "1563474076", @@ -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": "" + } } ] ``` diff --git a/content/reference/api/hook/update.md b/content/reference/api/hook/update.md index 3955d4d04..a00645f41 100644 --- a/content/reference/api/hook/update.md +++ b/content/reference/api/hook/update.md @@ -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": "" + } } ``` diff --git a/content/reference/api/hook/view.md b/content/reference/api/hook/view.md index 7d7487753..1443fd777 100644 --- a/content/reference/api/hook/view.md +++ b/content/reference/api/hook/view.md @@ -53,10 +53,8 @@ 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", @@ -64,6 +62,84 @@ curl \ "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": "" + } } ```