lib/learn_web/client/pull_request.rb in learn-web-1.0.5 vs lib/learn_web/client/pull_request.rb in learn-web-1.1.0

- old
+ new

@@ -6,15 +6,14 @@ def pr_endpoint "#{API_ROOT}/lesson_submissions" end def issue_pull_request(repo_name:, branch_name:) - response = @conn.post do |req| - req.url pr_endpoint - req.headers['Authorization'] = "Bearer #{token}" - req.params['repo_name'] = repo_name - req.params['branch_name'] = branch_name - end + 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