Sha256: 56b9bca498170b747375e87bdb6eb29d2394101c0567be8e93ba144137683795

Contents?: true

Size: 520 Bytes

Versions: 2

Compression:

Stored size: 520 Bytes

Contents

require 'learn_web/client/pull_request/response'

module LearnWeb
  class Client
    module PullRequest
      def pr_endpoint
        "#{API_ROOT}/lesson_submissions"
      end

      def issue_pull_request(repo_name:, branch_name:)
        response = post(
          pr_endpoint,
          headers: { 'Authorization' => "Bearer #{token}" },
          params: { 'repo_name' => repo_name, 'branch_name' => branch_name }
        )

        LearnWeb::Client::PullRequest::Response.new(response)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
learn-web-1.2.0 lib/learn_web/client/pull_request.rb
learn-web-1.1.0 lib/learn_web/client/pull_request.rb