diff options
Diffstat (limited to 'lib/bitbucket/representation/pull_request.rb')
-rw-r--r-- | lib/bitbucket/representation/pull_request.rb | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/bitbucket/representation/pull_request.rb b/lib/bitbucket/representation/pull_request.rb index 6a0e8b354bf..ecb8746da8d 100644 --- a/lib/bitbucket/representation/pull_request.rb +++ b/lib/bitbucket/representation/pull_request.rb @@ -4,63 +4,63 @@ module Bitbucket module Representation class PullRequest < Representation::Base def author - raw.fetch('author', {}).fetch('username', nil) + raw.fetch("author", {}).fetch("username", nil) end def description - raw['description'] + raw["description"] end def iid - raw['id'] + raw["id"] end def state - if raw['state'] == 'MERGED' - 'merged' - elsif raw['state'] == 'DECLINED' - 'closed' + if raw["state"] == "MERGED" + "merged" + elsif raw["state"] == "DECLINED" + "closed" else - 'opened' + "opened" end end def created_at - raw['created_on'] + raw["created_on"] end def updated_at - raw['updated_on'] + raw["updated_on"] end def title - raw['title'] + raw["title"] end def source_branch_name - source_branch.fetch('branch', {}).fetch('name', nil) + source_branch.fetch("branch", {}).fetch("name", nil) end def source_branch_sha - source_branch.fetch('commit', {}).fetch('hash', nil) + source_branch.fetch("commit", {}).fetch("hash", nil) end def target_branch_name - target_branch.fetch('branch', {}).fetch('name', nil) + target_branch.fetch("branch", {}).fetch("name", nil) end def target_branch_sha - target_branch.fetch('commit', {}).fetch('hash', nil) + target_branch.fetch("commit", {}).fetch("hash", nil) end private def source_branch - raw['source'] + raw["source"] end def target_branch - raw['destination'] + raw["destination"] end end end |