Sha256: df2bdfaaa2a1eac1f36a6a5be1bf2899c55a83c829564a37342b200bd6eeec3f
Contents?: true
Size: 766 Bytes
Versions: 8
Compression:
Stored size: 766 Bytes
Contents
# frozen_string_literal: true require 'English' require 'open3' require 'shellwords' module Geet module Helpers # Helper for services common workflow, for example, find the merge head. # module ServicesWorkflowHelper # Requires: @git_client # def find_merge_head [@git_client.owner, @git_client.current_branch] end # Expect to find only one. # # Requires: @out, @repository. # def checked_find_branch_pr(owner, head) @out.puts "Finding PR with head (#{owner}:#{head})..." prs = @repository.prs(owner: owner, head: head) raise "Expected to find only one PR for the current branch; found: #{prs.size}" if prs.size != 1 prs[0] end end end end
Version data entries
8 entries across 8 versions & 1 rubygems