From e2de14a3c971337d1442a893366e378f416bcc0d Mon Sep 17 00:00:00 2001 From: selfisekai Date: Fri, 21 Aug 2020 14:36:48 +0200 Subject: [PATCH] github: fix indicating merge request merged state --- src/vendor/github/repomgr.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vendor/github/repomgr.ts b/src/vendor/github/repomgr.ts index 9ef1756..671cccf 100644 --- a/src/vendor/github/repomgr.ts +++ b/src/vendor/github/repomgr.ts @@ -125,14 +125,13 @@ export default class GitHubRepoManager implements RepoManager { title body isDraft - closed - closedAt mergeable - merged + state mergedAt mergedBy { login } + closedAt labels(first: 0) { nodes { name @@ -158,7 +157,11 @@ export default class GitHubRepoManager implements RepoManager { content: pullRequest.body, title: pullRequest.title, repo: this.repo, - state: pullRequest.closed ? MERGE_REQUEST_STATE.CLOSED : MERGE_REQUEST_STATE.OPEN, + state: { + OPEN: MERGE_REQUEST_STATE.OPEN, + CLOSED: MERGE_REQUEST_STATE.CLOSED, + MERGED: MERGE_REQUEST_STATE.MERGED, + }[pullRequest.state], mergability: { MERGEABLE: MERGE_REQUEST_MERGABILITY.MERGEABLE, CONFLICTING: MERGE_REQUEST_MERGABILITY.CONFLICTING,