Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new properties to merge_group event #721

Merged
merged 8 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "[email protected]"
},
"committer": {
"name": "Codertocat",
"email": "[email protected]"
}
}
},
"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
42 changes: 40 additions & 2 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": "[email protected]"
},
"committer": {
"name": "Codertocat",
"email": "[email protected]"
}
}
},
"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": "[email protected]"
},
"committer": {
"name": "Codertocat",
"email": "[email protected]"
}
}
},
"repository": {
"id": 17273051,
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": "[email protected]"
},
"committer": {
"name": "Codertocat",
"email": "[email protected]"
}
}
},
"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