Sha256: 4747bba14b7d359c86347756d24fce6bed6438fbf3794cf97f0b5474e5e455b2

Contents?: true

Size: 1.43 KB

Versions: 10

Compression:

Stored size: 1.43 KB

Contents

command(:deliver, arguments: { base: "master" }, flags: { merge_method: "merge" }, switches: { force: false, skip_lgtm: false }) do |**params|
  params[:force] = params[:force] || params[:skip_lgtm]
  begin
    existing_pull_request = git_server.find_open_pull_request( from: current_branch, to: params[:base] )

    if existing_pull_request.nil?
      say "No pull request exists for #{remote_user}:#{current_branch}\nPlease submit your branch for review first with \`git reflow review\`", :deliver_halted
    else

      if existing_pull_request.good_to_merge?(force: params[:force])
        # displays current status and prompts user for confirmation
        self.status destination_branch: params[:base]
        existing_pull_request.merge!(params)
      else
        say existing_pull_request.rejection_message, :deliver_halted
      end

    end

  rescue Github::Error::UnprocessableEntity => e
    say "Github Error: #{e.inspect}", :error
  end
end
command_help(
  :deliver,
  summary: "deliver your feature branch",
  arguments: {
    base: "the branch to merge this feature into"
  },
  flags: {
    merge_method: "how you want your feature branch merged ('merge', 'squash', 'rebase')"
  },
  switches: {
    force: "skip the lgtm checks and deliver your feature branch",
    skip_lgtm: "skip the lgtm checks and deliver your feature branch"
  },
  description: "merge your feature branch down to your base branch, and cleanup your feature branch"
)

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
git_reflow-0.9.9 lib/git_reflow/workflows/FlatMergeWorkflow
git_reflow-0.9.8 lib/git_reflow/workflows/FlatMergeWorkflow
git_reflow-0.9.7 lib/git_reflow/workflows/FlatMergeWorkflow
git_reflow-0.9.6 lib/git_reflow/workflows/FlatMergeWorkflow
git_reflow-0.9.5 lib/git_reflow/workflows/FlatMergeWorkflow
git_reflow-0.9.4 lib/git_reflow/workflows/FlatMergeWorkflow
git_reflow-0.9.3 lib/git_reflow/workflows/FlatMergeWorkflow
git_reflow-0.9.2 lib/git_reflow/workflows/FlatMergeWorkflow
git_reflow-0.9.1 lib/git_reflow/workflows/FlatMergeWorkflow
git_reflow-0.9.0 lib/git_reflow/workflows/FlatMergeWorkflow