Class: Toolshed::Commands::CreatePullRequest

Inherits:
Base
  • Object
show all
Defined in:
lib/toolshed/commands/create_pull_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#read_user_input, #read_user_input_body, #read_user_input_title, #use_project_id, #use_ticket_tracker_by_type, #use_ticket_tracker_project_id, #use_ticket_tracker_project_name

Constructor Details

#initialize(options = {}) ⇒ CreatePullRequest

Returns a new instance of CreatePullRequest.



12
13
14
15
16
# File 'lib/toolshed/commands/create_pull_request.rb', line 12

def initialize(options={})
  super(options)
  self.ticket_tracker_class = nil
  self.pull_request_url = ''
end

Instance Attribute Details

#git_toolObject

Returns the value of attribute git_tool.



6
7
8
# File 'lib/toolshed/commands/create_pull_request.rb', line 6

def git_tool
  @git_tool
end

#pull_request_bodyObject

Returns the value of attribute pull_request_body.



6
7
8
# File 'lib/toolshed/commands/create_pull_request.rb', line 6

def pull_request_body
  @pull_request_body
end

#pull_request_titleObject

Returns the value of attribute pull_request_title.



6
7
8
# File 'lib/toolshed/commands/create_pull_request.rb', line 6

def pull_request_title
  @pull_request_title
end

#pull_request_urlObject

Returns the value of attribute pull_request_url.



6
7
8
# File 'lib/toolshed/commands/create_pull_request.rb', line 6

def pull_request_url
  @pull_request_url
end

#ticket_idObject

Returns the value of attribute ticket_id.



6
7
8
# File 'lib/toolshed/commands/create_pull_request.rb', line 6

def ticket_id
  @ticket_id
end

#ticket_trackerObject

Returns the value of attribute ticket_tracker.



6
7
8
# File 'lib/toolshed/commands/create_pull_request.rb', line 6

def ticket_tracker
  @ticket_tracker
end

#ticket_tracker_classObject

Returns the value of attribute ticket_tracker_class.



6
7
8
# File 'lib/toolshed/commands/create_pull_request.rb', line 6

def ticket_tracker_class
  @ticket_tracker_class
end

#ticket_tracker_project_idObject

Returns the value of attribute ticket_tracker_project_id.



6
7
8
# File 'lib/toolshed/commands/create_pull_request.rb', line 6

def ticket_tracker_project_id
  @ticket_tracker_project_id
end

#ticket_tracking_titleObject

Returns the value of attribute ticket_tracking_title.



6
7
8
# File 'lib/toolshed/commands/create_pull_request.rb', line 6

def ticket_tracking_title
  @ticket_tracking_title
end

#ticket_tracking_urlObject

Returns the value of attribute ticket_tracking_url.



6
7
8
# File 'lib/toolshed/commands/create_pull_request.rb', line 6

def ticket_tracking_url
  @ticket_tracking_url
end

Instance Method Details

#execute(args, options = {}) ⇒ Object



18
19
20
21
22
# File 'lib/toolshed/commands/create_pull_request.rb', line 18

def execute(args, options = {})
  output_begining_messages
  options = execute_ticket_tracking(options)
  options = execute_pull_request(options) unless options.nil?
end