class CiHelper::Bitbucket::PullRequestPage
Attributes
form[RW]
This class is responsible for the update the pull request form in the bitbucket example : object.form_set do |config|
config.title = 'your title' config.destination = 'the branch name you want to merge' config.reviewer = 'the reviewer you want to add' config.append_description = 'text ' config.description_syntax('ruby') do |content| content.value += 'your code' end
end
point_counter[RW]
This class is responsible for the update the pull request form in the bitbucket example : object.form_set do |config|
config.title = 'your title' config.destination = 'the branch name you want to merge' config.reviewer = 'the reviewer you want to add' config.append_description = 'text ' config.description_syntax('ruby') do |content| content.value += 'your code' end
end
Public Class Methods
new()
click to toggle source
# File lib/ci_helper/bitbucket/pull_request_page.rb, line 21 def initialize @point_counter = 1 end
Public Instance Methods
append_description=(append_text)
click to toggle source
# File lib/ci_helper/bitbucket/pull_request_page.rb, line 46 def append_description=(append_text) description.value += "\n#{append_text}\n" end
description_point=(text)
click to toggle source
# File lib/ci_helper/bitbucket/pull_request_page.rb, line 41 def description_point=(text) description.value += "#{point_counter}. #{text}\n" self.point_counter += 1 end
description_syntax(language, &failure_block)
click to toggle source
# File lib/ci_helper/bitbucket/pull_request_page.rb, line 50 def description_syntax(language, &failure_block) description.value += "```\n" description.value += "#!#{language} \n" failure_block.call(description) if block_given? description.value += "```\n" end
destination=(dest)
click to toggle source
# File lib/ci_helper/bitbucket/pull_request_page.rb, line 29 def destination=(dest) form.field_with(name: 'dest').options.select { |option| option.text == dest.to_s}.first.select end
reviewers=(reviewers)
click to toggle source
# File lib/ci_helper/bitbucket/pull_request_page.rb, line 37 def reviewers=(reviewers) form.field_with(name: 'reviewers').value = reviewers end
source=(branch_name)
click to toggle source
# File lib/ci_helper/bitbucket/pull_request_page.rb, line 33 def source=(branch_name) form.field_with(name: 'source').options.select { |option| option.text == branch_name}.first.select end
submit()
click to toggle source
# File lib/ci_helper/bitbucket/pull_request_page.rb, line 57 def submit description.value += "\n CiHelper Version #{::CiHelper::VERSION}" form.click_button end
title=(text)
click to toggle source
# File lib/ci_helper/bitbucket/pull_request_page.rb, line 25 def title=(text) form.field_with(name: 'title').value = text end
Private Instance Methods
description()
click to toggle source
# File lib/ci_helper/bitbucket/pull_request_page.rb, line 64 def description form.field_with(name: 'description') end