Skip to content

Commit

Permalink
fix: return array of states
Browse files Browse the repository at this point in the history
  • Loading branch information
adelkahomolova committed Nov 25, 2019
1 parent 42a10e5 commit 7f19213
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/git/VCSServicesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class VCSServicesUtils {
static getPRState = (
state: PullRequestState | undefined,
service: VCSService,
): GitHubPullRequestState | BitbucketPullRequestState | undefined => {
): GitHubPullRequestState | BitbucketPullRequestState | BitbucketPullRequestState[] | undefined => {
if (service === VCSService.github) {
switch (state) {
case PullRequestState.open:
Expand All @@ -27,7 +27,7 @@ export class VCSServicesUtils {
case PullRequestState.closed:
return BitbucketPullRequestState.closed;
case PullRequestState.all:
return BitbucketPullRequestState.open && BitbucketPullRequestState.closed && BitbucketPullRequestState.declined;
return [BitbucketPullRequestState.open, BitbucketPullRequestState.closed, BitbucketPullRequestState.declined];
default:
return undefined;
}
Expand Down

0 comments on commit 7f19213

Please sign in to comment.