Skip to content
Open
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<!-- Your comment below this -->

- `github.reviews` now reports the review states GitHub actually sends, so checking for a review that requested changes works - fixes [#1443](https://github.com/danger/danger-js/issues/1443) [@Socialpranker]
- Upgrade to undici 6.27.0 to resolve transitive CVEs - fixes [#1517](https://github.com/danger/danger-js/issues/1517) [@rjatkins]

<!-- Your comment above this -->
Expand Down Expand Up @@ -2146,6 +2147,7 @@ Not usable for others, only stubs of classes etc. - [@orta]
[@sharkysharks]: https://github.com/sharkysharks
[@shyim]: https://github.com/shyim
[@snowe2010]: https://github.com/snowe2010
[@socialpranker]: https://github.com/Socialpranker
[@sogame]: https://github.com/sogame
[@soyn]: https://github.com/Soyn
[@stefanbuck]: https://github.com/stefanbuck
Expand Down
8 changes: 1 addition & 7 deletions source/danger-incoming-process-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1888,13 +1888,7 @@
"type": "number"
},
"state": {
"description": "The state of the review\nAPPROVED, REQUEST_CHANGES, COMMENT or PENDING",
"enum": [
"APPROVED",
"COMMENT",
"PENDING",
"REQUEST_CHANGES"
],
"description": "The state of the review, e.g. APPROVED, CHANGES_REQUESTED, COMMENTED,\nDISMISSED or PENDING. GitHub does not document a closed set of values for\nthis field, so it is typed as a union with `string` rather than an exact\none: the literals give you autocomplete, and `string` keeps the type honest\nabout values GitHub may add.",
"type": "string"
},
"user": {
Expand Down
9 changes: 6 additions & 3 deletions source/danger.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1450,10 +1450,13 @@ interface GitHubReview {
commit_id?: string

/**
* The state of the review
* APPROVED, REQUEST_CHANGES, COMMENT or PENDING
* The state of the review, e.g. APPROVED, CHANGES_REQUESTED, COMMENTED,
* DISMISSED or PENDING. GitHub does not document a closed set of values for
* this field, so it is typed as a union with `string` rather than an exact
* one: the literals give you autocomplete, and `string` keeps the type honest
* about values GitHub may add.
*/
state?: "APPROVED" | "REQUEST_CHANGES" | "COMMENT" | "PENDING"
state?: "APPROVED" | "CHANGES_REQUESTED" | "COMMENTED" | "DISMISSED" | "PENDING" | string
}

/** Provides the current PR in an easily used way for params in `github.api` calls */
Expand Down
27 changes: 15 additions & 12 deletions source/dsl/GitHubDSL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,13 @@ export interface GitHubPRDSL {

/** How does the PR author relate to this repo/org? */
author_association:
| "COLLABORATOR"
| "CONTRIBUTOR"
| "FIRST_TIMER"
| "FIRST_TIME_CONTRIBUTOR"
| "MEMBER"
| "NONE"
| "OWNER"
| "COLLABORATOR"
| "CONTRIBUTOR"
| "FIRST_TIMER"
| "FIRST_TIME_CONTRIBUTOR"
| "MEMBER"
| "NONE"
| "OWNER"
}

// These are the individual subtypes of objects inside the larger DSL objects above.
Expand Down Expand Up @@ -450,10 +450,13 @@ export interface GitHubReview {
commit_id?: string

/**
* The state of the review
* APPROVED, REQUEST_CHANGES, COMMENT or PENDING
* The state of the review, e.g. APPROVED, CHANGES_REQUESTED, COMMENTED,
* DISMISSED or PENDING. GitHub does not document a closed set of values for
* this field, so it is typed as a union with `string` rather than an exact
* one: the literals give you autocomplete, and `string` keeps the type honest
* about values GitHub may add.
*/
state?: "APPROVED" | "REQUEST_CHANGES" | "COMMENT" | "PENDING"
state?: "APPROVED" | "CHANGES_REQUESTED" | "COMMENTED" | "DISMISSED" | "PENDING" | string
}

/** Provides the current PR in an easily used way for params in `github.api` calls */
Expand All @@ -462,8 +465,8 @@ export interface GitHubAPIPR {
owner: string
/** The repo name */
repo: string
/**
* The PR number
/**
* The PR number
* @deprecated use `pull_number` instead
*/
number: number
Expand Down
Loading