Skip to content

Commit

Permalink
feat: add new properties to merge_group event (#721)
Browse files Browse the repository at this point in the history
Co-authored-by: wolfy1339 <webmaster@wolfy1339.com>
  • Loading branch information
octokitbot and wolfy1339 committed Oct 21, 2022
1 parent 21f2a48 commit e637b64
Show file tree
Hide file tree
Showing 10 changed files with 164 additions and 16 deletions.
31 changes: 29 additions & 2 deletions cache/api.github.com/webhook-events-and-payloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -9099,13 +9099,25 @@ <h3 id="webhook-payload-object-24">
<td><code>string</code></td>
<td>The full ref of the merge group.</td>
</tr>
<tr>
<td><code>merge_group[base_sha]</code></td>
<td><code>string</code></td>
<td>The SHA of the merge group's parent commit.</td>
</tr>
<tr>
<td><code>merge_group[base_ref]</code></td>
<td><code>string</code></td>
<td>
The full ref of the branch the merge group will be merged into.
</td>
</tr>
<tr>
<td><code>merge_group[head_commit]</code></td>
<td><code>object</code></td>
<td>
An expanded representation of the <code>head_sha</code> commit.
</td>
</tr>
<tr>
<td><code>repository</code></td>
<td><code>object</code></td>
Expand Down Expand Up @@ -9173,7 +9185,22 @@ <h3 id="webhook-payload-example-22">
"merge_group": {
"head_sha": "2ffea6db159f6b6c47a24e778fb9ef40cf6b1c7d",
"head_ref": "refs/heads/gh-readonly-queue/main/pr-104-929f8209d40f77f4abc622a499c93a83babdbe64",
"base_ref": "refs/heads/main"
"base_sha": "380387fbc80638b734a49e1be1c4dfec1c01b33c",
"base_ref": "refs/heads/main",
"head_commit": {
"id": "ec26c3e57ca3a959ca5aad62de7213c562f8c821",
"tree_id": "31b122c26a97cf9af023e9ddab94a82c6e77b0ea",
"message": "Merge pull request #2048 from octo-repo/update-readme\n\nUpdate README.md",
"timestamp": "2019-05-15T15:20:30Z",
"author": {
"name": "Codertocat",
"email": "21031067+Codertocat@users.noreply.github.com"
},
"committer": {
"name": "Codertocat",
"email": "21031067+Codertocat@users.noreply.github.com"
}
}
},
"repository": {
"id": 17273051,
Expand Down Expand Up @@ -19902,7 +19929,7 @@ <h3 id="webhook-payload-object-53">
<tr>
<td><code>ref</code></td>
<td><code>string</code></td>
<td>The branch ref from which the workflow was run.</td>
<td>The branch or tag from which the workflow was run.</td>
</tr>
<tr>
<td><code>repository</code></td>
Expand Down
4 changes: 2 additions & 2 deletions cache/ghes-32/webhook-events-and-payloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ <h3 id="example-delivery">
&gt; {
&gt; "action": "opened",
&gt; "issue": {
&gt; "url": "http(s)://<em>[hostname]</em>/api/v3/repos/octocat/Hello-World/issues/1347",
&gt; "url": "http(s)://<em>HOSTNAME</em>/api/v3/repos/octocat/Hello-World/issues/1347",
&gt; "number": 1347,
&gt; ...
&gt; },
Expand Down Expand Up @@ -17913,7 +17913,7 @@ <h3 id="webhook-payload-object-44">
<tr>
<td><code>ref</code></td>
<td><code>string</code></td>
<td>The branch ref from which the workflow was run.</td>
<td>The branch or tag from which the workflow was run.</td>
</tr>
<tr>
<td><code>repository</code></td>
Expand Down
4 changes: 2 additions & 2 deletions cache/ghes-33/webhook-events-and-payloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ <h3 id="example-delivery">
&gt; {
&gt; "action": "opened",
&gt; "issue": {
&gt; "url": "http(s)://<em>[hostname]</em>/api/v3/repos/octocat/Hello-World/issues/1347",
&gt; "url": "http(s)://<em>HOSTNAME</em>/api/v3/repos/octocat/Hello-World/issues/1347",
&gt; "number": 1347,
&gt; ...
&gt; },
Expand Down Expand Up @@ -17944,7 +17944,7 @@ <h3 id="webhook-payload-object-44">
<tr>
<td><code>ref</code></td>
<td><code>string</code></td>
<td>The branch ref from which the workflow was run.</td>
<td>The branch or tag from which the workflow was run.</td>
</tr>
<tr>
<td><code>repository</code></td>
Expand Down
4 changes: 2 additions & 2 deletions cache/ghes-34/webhook-events-and-payloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ <h3 id="example-delivery">
&gt; {
&gt; "action": "opened",
&gt; "issue": {
&gt; "url": "http(s)://<em>[hostname]</em>/api/v3/repos/octocat/Hello-World/issues/1347",
&gt; "url": "http(s)://<em>HOSTNAME</em>/api/v3/repos/octocat/Hello-World/issues/1347",
&gt; "number": 1347,
&gt; ...
&gt; },
Expand Down Expand Up @@ -18376,7 +18376,7 @@ <h3 id="webhook-payload-object-46">
<tr>
<td><code>ref</code></td>
<td><code>string</code></td>
<td>The branch ref from which the workflow was run.</td>
<td>The branch or tag from which the workflow was run.</td>
</tr>
<tr>
<td><code>repository</code></td>
Expand Down
4 changes: 2 additions & 2 deletions cache/ghes-35/webhook-events-and-payloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ <h3 id="example-delivery">
&gt; {
&gt; "action": "opened",
&gt; "issue": {
&gt; "url": "http(s)://<em>[hostname]</em>/api/v3/repos/octocat/Hello-World/issues/1347",
&gt; "url": "http(s)://<em>HOSTNAME</em>/api/v3/repos/octocat/Hello-World/issues/1347",
&gt; "number": 1347,
&gt; ...
&gt; },
Expand Down Expand Up @@ -18693,7 +18693,7 @@ <h3 id="webhook-payload-object-47">
<tr>
<td><code>ref</code></td>
<td><code>string</code></td>
<td>The branch ref from which the workflow was run.</td>
<td>The branch or tag from which the workflow was run.</td>
</tr>
<tr>
<td><code>repository</code></td>
Expand Down
2 changes: 1 addition & 1 deletion cache/github.ae/webhook-events-and-payloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ <h3 id="example-delivery">
&gt; {
&gt; "action": "opened",
&gt; "issue": {
&gt; "url": "https://<em>[hostname]</em>/api/v3/repos/octocat/Hello-World/issues/1347",
&gt; "url": "https://<em>HOSTNAME</em>/api/v3/repos/octocat/Hello-World/issues/1347",
&gt; "number": 1347,
&gt; ...
&gt; },
Expand Down
44 changes: 41 additions & 3 deletions payload-examples/api.github.com/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -29968,10 +29968,18 @@
"type": "string",
"description": "The full ref of the merge group."
},
"merge_group[base_sha]": {
"type": "string",
"description": "The SHA of the merge group's parent commit."
},
"merge_group[base_ref]": {
"type": "string",
"description": "The full ref of the branch the merge group will be merged into."
},
"merge_group[head_commit]": {
"type": "object",
"description": "An expanded representation of the `head_sha` commit."
},
"repository": {
"type": "object",
"description": "The [`repository`](https://docs.github.com/en/rest/reference/repos#get-a-repository) where the event occurred."
Expand All @@ -29995,7 +30003,22 @@
"merge_group": {
"head_sha": "2ffea6db159f6b6c47a24e778fb9ef40cf6b1c7d",
"head_ref": "refs/heads/gh-readonly-queue/main/pr-104-929f8209d40f77f4abc622a499c93a83babdbe64",
"base_ref": "refs/heads/main"
"base_sha": "380387fbc80638b734a49e1be1c4dfec1c01b33c",
"base_ref": "refs/heads/main",
"head_commit": {
"id": "ec26c3e57ca3a959ca5aad62de7213c562f8c821",
"tree_id": "31b122c26a97cf9af023e9ddab94a82c6e77b0ea",
"message": "Merge pull request #2048 from octo-repo/update-readme\n\nUpdate README.md",
"timestamp": "2019-05-15T15:20:30Z",
"author": {
"name": "Codertocat",
"email": "21031067+Codertocat@users.noreply.github.com"
},
"committer": {
"name": "Codertocat",
"email": "21031067+Codertocat@users.noreply.github.com"
}
}
},
"repository": {
"id": 17273051,
Expand Down Expand Up @@ -30135,7 +30158,22 @@
"merge_group": {
"head_sha": "2ffea6db159f6b6c47a24e778fb9ef40cf6b1c7d",
"head_ref": "refs/heads/gh-readonly-queue/main/pr-104-929f8209d40f77f4abc622a499c93a83babdbe64",
"base_ref": "refs/heads/main"
"base_sha": "380387fbc80638b734a49e1be1c4dfec1c01b33c",
"base_ref": "refs/heads/main",
"head_commit": {
"id": "ec26c3e57ca3a959ca5aad62de7213c562f8c821",
"tree_id": "31b122c26a97cf9af023e9ddab94a82c6e77b0ea",
"message": "Merge pull request #2048 from octo-repo/update-readme\n\nUpdate README.md",
"timestamp": "2019-05-15T15:20:30Z",
"author": {
"name": "Codertocat",
"email": "21031067+Codertocat@users.noreply.github.com"
},
"committer": {
"name": "Codertocat",
"email": "21031067+Codertocat@users.noreply.github.com"
}
}
},
"repository": {
"id": 17273051,
Expand Down Expand Up @@ -68787,7 +68825,7 @@
},
"ref": {
"type": "string",
"description": "The branch ref from which the workflow was run."
"description": "The branch or tag from which the workflow was run."
},
"repository": {
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,22 @@
"merge_group": {
"head_sha": "2ffea6db159f6b6c47a24e778fb9ef40cf6b1c7d",
"head_ref": "refs/heads/gh-readonly-queue/main/pr-104-929f8209d40f77f4abc622a499c93a83babdbe64",
"base_ref": "refs/heads/main"
"base_sha": "380387fbc80638b734a49e1be1c4dfec1c01b33c",
"base_ref": "refs/heads/main",
"head_commit": {
"id": "ec26c3e57ca3a959ca5aad62de7213c562f8c821",
"tree_id": "31b122c26a97cf9af023e9ddab94a82c6e77b0ea",
"message": "Merge pull request #2048 from octo-repo/update-readme\n\nUpdate README.md",
"timestamp": "2019-05-15T15:20:30Z",
"author": {
"name": "Codertocat",
"email": "21031067+Codertocat@users.noreply.github.com"
},
"committer": {
"name": "Codertocat",
"email": "21031067+Codertocat@users.noreply.github.com"
}
}
},
"repository": {
"id": 17273051,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
"merge_group": {
"type": "object",
"description": "The merge group.",
"required": ["head_sha", "head_ref", "base_ref"],
"required": [
"head_sha",
"head_ref",
"base_ref",
"base_sha",
"head_commit"
],
"properties": {
"head_sha": {
"type": "string",
Expand All @@ -21,6 +27,47 @@
"base_ref": {
"type": "string",
"description": "The full ref of the branch the merge group will be merged into."
},
"base_sha": {
"type": "string",
"description": "The SHA of the merge group's parent commit."
},
"head_commit": {
"type": "object",
"description": "An expanded representation of the `head_sha` commit.",
"required": [
"id",
"tree_id",
"message",
"timestamp",
"author",
"committer"
],
"properties": {
"id": { "type": "string" },
"tree_id": { "type": "string" },
"message": { "type": "string" },
"timestamp": { "type": "string", "format": "date-time" },
"author": {
"type": "object",
"required": ["name", "email"],
"properties": {
"name": { "type": "string" },
"email": { "type": "string" }
},
"additionalProperties": false
},
"committer": {
"type": "object",
"required": ["name", "email"],
"properties": {
"name": { "type": "string" },
"email": { "type": "string" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
Expand Down
21 changes: 21 additions & 0 deletions payload-types/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4339,6 +4339,27 @@ export interface MergeGroupChecksRequestedEvent {
* The full ref of the branch the merge group will be merged into.
*/
base_ref: string;
/**
* The SHA of the merge group's parent commit.
*/
base_sha: string;
/**
* An expanded representation of the `head_sha` commit.
*/
head_commit: {
id: string;
tree_id: string;
message: string;
timestamp: string;
author: {
name: string;
email: string;
};
committer: {
name: string;
email: string;
};
};
};
repository: Repository;
sender: User;
Expand Down

0 comments on commit e637b64

Please sign in to comment.