Use a case statement to determine pull request state

This commit is contained in:
Stan Hu 2018-08-02 14:45:54 -07:00
parent a662670b90
commit f2a99398bf

View file

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