Skip to content

Commit

Permalink
feat: new pull_request.dequeued and pull_request.queued events (#715
Browse files Browse the repository at this point in the history
)

Co-authored-by: wolfy1339 <webmaster@wolfy1339.com>
  • Loading branch information
octokitbot and wolfy1339 authored Oct 3, 2022
1 parent efdb9c1 commit 44b5c3c
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 0 deletions.
22 changes: 22 additions & 0 deletions cache/api.github.com/webhook-events-and-payloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -12561,6 +12561,12 @@ <h2 id="pull_request">
>pull requests</a
>" REST API.
</p>
<div>
<p>
<strong>Note:</strong> The pull request merge queue feature is
currently in limited public beta and subject to change.
</p>
</div>
<h3 id="availability-36">
<a aria-hidden="" tabindex="-1" href="#availability-36"
><svg
Expand Down Expand Up @@ -12635,7 +12641,15 @@ <h3 id="webhook-payload-object-36">
<code>true</code>, the pull request was merged.
</li>
<li><code>converted_to_draft</code></li>
<li>
<code>dequeued</code>: Triggered when a pull request is
removed from a merge queue
</li>
<li><code>edited</code></li>
<li>
<code>enqueued</code>: Triggered when a pull request is added
to a merge queue
</li>
<li><code>labeled</code></li>
<li><code>locked</code></li>
<li><code>opened</code></li>
Expand Down Expand Up @@ -12690,6 +12704,14 @@ <h3 id="webhook-payload-object-36">
The <a href="/en/rest/reference/pulls">pull request</a> itself.
</td>
</tr>
<tr>
<td><code>reason</code></td>
<td><code>string</code></td>
<td>
The reason the pull request was removed from a merge queue if the
action was <code>dequeued</code>.
</td>
</tr>
<tr>
<td><code>repository</code></td>
<td><code>object</code></td>
Expand Down
6 changes: 6 additions & 0 deletions payload-examples/api.github.com/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -36405,7 +36405,9 @@
"auto_merge_enabled",
"closed",
"converted_to_draft",
"dequeued",
"edited",
"enqueued",
"labeled",
"locked",
"merged",
Expand Down Expand Up @@ -36440,6 +36442,10 @@
"type": "object",
"description": "The [pull request](https://docs.github.com/en/rest/reference/pulls) itself."
},
"reason": {
"type": "string",
"description": "The reason the pull request was removed from a merge queue if the action was `dequeued`."
},
"repository": {
"type": "object",
"description": "The [`repository`](https://docs.github.com/en/rest/reference/repos#get-a-repository) where the event occurred."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "pull_request$dequeued",
"type": "object",
"required": [
"action",
"number",
"reason",
"pull_request",
"repository",
"sender"
],
"properties": {
"action": { "type": "string", "enum": ["dequeued"] },
"number": { "type": "integer", "description": "The pull request number." },
"reason": {
"type": "string",
"description": "The reason the pull request was removed from a merge queue."
},
"pull_request": { "$ref": "common/pull-request.schema.json" },
"repository": { "$ref": "common/repository.schema.json" },
"installation": { "$ref": "common/installation-lite.schema.json" },
"organization": { "$ref": "common/organization.schema.json" },
"sender": { "$ref": "common/user.schema.json" }
},
"additionalProperties": false,
"title": "pull_request dequeued event"
}
17 changes: 17 additions & 0 deletions payload-schemas/api.github.com/pull_request/queued.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "pull_request$queued",
"type": "object",
"required": ["action", "number", "pull_request", "repository", "sender"],
"properties": {
"action": { "type": "string", "enum": ["queued"] },
"number": { "type": "integer", "description": "The pull request number." },
"pull_request": { "$ref": "common/pull-request.schema.json" },
"repository": { "$ref": "common/repository.schema.json" },
"installation": { "$ref": "common/installation-lite.schema.json" },
"organization": { "$ref": "common/organization.schema.json" },
"sender": { "$ref": "common/user.schema.json" }
},
"additionalProperties": false,
"title": "pull_request queued event"
}
30 changes: 30 additions & 0 deletions payload-types/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,12 @@ export type PullRequestEvent =
| PullRequestAutoMergeEnabledEvent
| PullRequestClosedEvent
| PullRequestConvertedToDraftEvent
| PullRequestDequeuedEvent
| PullRequestEditedEvent
| PullRequestLabeledEvent
| PullRequestLockedEvent
| PullRequestOpenedEvent
| PullRequestQueuedEvent
| PullRequestReadyForReviewEvent
| PullRequestReopenedEvent
| PullRequestReviewRequestRemovedEvent
Expand Down Expand Up @@ -5040,6 +5042,22 @@ export interface PullRequestConvertedToDraftEvent {
organization?: Organization;
sender: User;
}
export interface PullRequestDequeuedEvent {
action: "dequeued";
/**
* The pull request number.
*/
number: number;
/**
* The reason the pull request was removed from a merge queue.
*/
reason: string;
pull_request: PullRequest;
repository: Repository;
installation?: InstallationLite;
organization?: Organization;
sender: User;
}
export interface PullRequestEditedEvent {
action: "edited";
/**
Expand Down Expand Up @@ -5120,6 +5138,18 @@ export interface PullRequestOpenedEvent {
organization?: Organization;
sender: User;
}
export interface PullRequestQueuedEvent {
action: "queued";
/**
* The pull request number.
*/
number: number;
pull_request: PullRequest;
repository: Repository;
installation?: InstallationLite;
organization?: Organization;
sender: User;
}
export interface PullRequestReadyForReviewEvent {
action: "ready_for_review";
/**
Expand Down

0 comments on commit 44b5c3c

Please sign in to comment.