Sha256: 1269c2572326d473a8312c6747e3ba28e936fd8fb8e3f1d3263efd0b02e37ae3

Contents?: true

Size: 556 Bytes

Versions: 10

Compression:

Stored size: 556 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:, message: nil)
        response = post(
          pr_endpoint,
          headers: { 'Authorization' => "Bearer #{token}" },
          params: { 'repo_name' => repo_name, 'branch_name' => branch_name, 'message' => message }
        )

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
learn-web-1.5.5 lib/learn_web/client/pull_request.rb
learn-web-1.5.4 lib/learn_web/client/pull_request.rb
learn-web-1.5.3 lib/learn_web/client/pull_request.rb
learn-web-1.5.2 lib/learn_web/client/pull_request.rb
learn-web-1.5.1 lib/learn_web/client/pull_request.rb
learn-web-1.5.0 lib/learn_web/client/pull_request.rb
learn-web-1.4.2 lib/learn_web/client/pull_request.rb
learn-web-1.4.1 lib/learn_web/client/pull_request.rb
learn-web-1.4.0 lib/learn_web/client/pull_request.rb
learn-web-1.3.0 lib/learn_web/client/pull_request.rb