Sha256: 112089936f8dc0bce163b4e4f912f131943994d2cd97b6c2686988d062571df9
Contents?: true
Size: 810 Bytes
Versions: 20
Compression:
Stored size: 810 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 # Expect to find only one. # # Requires: @out, @repository. # def checked_find_branch_pr owner = if @repository.upstream? @repository.authenticated_user.username else @git_client.owner end head = @git_client.current_branch @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
20 entries across 20 versions & 1 rubygems