Use a case statement to determine pull request state
This commit is contained in:
parent
a662670b90
commit
f2a99398bf
1 changed files with 3 additions and 2 deletions
|
@ -20,9 +20,10 @@ module BitbucketServer
|
|||
end
|
||||
|
||||
def state
|
||||
if raw['state'] == 'MERGED'
|
||||
case raw['state']
|
||||
when 'MERGED'
|
||||
'merged'
|
||||
elsif raw['state'] == 'DECLINED'
|
||||
when 'DECLINED'
|
||||
'closed'
|
||||
else
|
||||
'opened'
|
||||
|
|
Loading…
Reference in a new issue