github: fix indicating merge request merged state

This commit is contained in:
selfisekai 2020-08-21 14:36:48 +02:00
parent a67e86c398
commit e2de14a3c9

View file

@ -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,