Merge pull request #5753 from reitermarkus/github

Pass additional options to `GitHub.pull_requests`.
This commit is contained in:
Markus Reiter 2019-02-16 12:06:05 +01:00 committed by GitHub
commit e87338ede1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -287,8 +287,8 @@ module GitHub
["admin", "write"].include?(permission(repo, user)["permission"])
end
def pull_requests(repo, base:, state: :open, **_options)
url = "#{API_URL}/repos/#{repo}/pulls?#{URI.encode_www_form(base: base, state: state)}"
def pull_requests(repo, **options)
url = "#{API_URL}/repos/#{repo}/pulls?#{URI.encode_www_form(options)}"
open_api(url)
end