Function
mapPRState
(
state: GHPRResponse["state"],
isDraft: boolean,
)
Source from the content-addressed store, hash-verified
| 147 | } |
| 148 | |
| 149 | function mapPRState( |
| 150 | state: GHPRResponse["state"], |
| 151 | isDraft: boolean, |
| 152 | ): NonNullable<GitHubStatus["pr"]>["state"] { |
| 153 | if (state === "MERGED") return "merged"; |
| 154 | if (state === "CLOSED") return "closed"; |
| 155 | if (isDraft) return "draft"; |
| 156 | return "open"; |
| 157 | } |
| 158 | |
| 159 | function mapReviewDecision( |
| 160 | decision: GHPRResponse["reviewDecision"], |
Tested by
no test coverage detected