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: new pull_request.dequeued and pull_request.queued events #715

Merged
merged 6 commits into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
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