From 3735ce43fc5adfb82fb22730978ba0bca696c37d Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 1 Jul 2018 05:13:15 -0700 Subject: Add a Reconfigure button and improve layout of import screen --- lib/bitbucket_server/connection.rb | 2 +- lib/bitbucket_server/representation/pull_request.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/bitbucket_server/connection.rb b/lib/bitbucket_server/connection.rb index 7374b73fa60..5c3bea3b743 100644 --- a/lib/bitbucket_server/connection.rb +++ b/lib/bitbucket_server/connection.rb @@ -7,7 +7,7 @@ module BitbucketServer def initialize(options = {}) @api_version = options.fetch(:api_version, DEFAULT_API_VERSION) @base_uri = options[:base_uri] - @username = options[:username] + @username = options[:user] @token = options[:password] end diff --git a/lib/bitbucket_server/representation/pull_request.rb b/lib/bitbucket_server/representation/pull_request.rb index 96a27564641..3e460f04064 100644 --- a/lib/bitbucket_server/representation/pull_request.rb +++ b/lib/bitbucket_server/representation/pull_request.rb @@ -27,6 +27,10 @@ module BitbucketServer end end + def merged? + state == 'merged' + end + def created_at raw['createdDate'] end -- cgit v1.2.1