Skip to content

Commit cedee29

Browse files
authored
Merge pull request #679 from keymanapp/fix/get-pr-state
fix: get PR state in queries
2 parents 7f94185 + 1bf6511 commit cedee29

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

server/data/status-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export class StatusData {
188188

189189
// this.setServiceStatus(StatusSource.KeymanPullRequest, ServiceStatusState.successful);
190190

191-
if(hasBeenClosed || pull.state == 'CLOSED') {
191+
if(hasBeenClosed || pull.state?.toString().toUpperCase() == 'CLOSED') {
192192
if(idx >= 0) {
193193
// pull has been closed, remove from cache
194194
console.log(`refreshGitHubPullRequestData: Removing ${repo}#${number} (index #${idx}) from cache and announcing refresh`);

server/services/github/github-status.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ export const pullRequestQuery = `
143143
isDraft # requires application/vnd.github.shadow-cat-preview+json
144144
headRefName
145145
baseRefName
146+
state
146147
147148
additions
148149
deletions

0 commit comments

Comments
 (0)