Created
August 10, 2019 16:28
-
-
Save borischerkasky/ccd23e01b173f9350a38dcc714930e2e to your computer and use it in GitHub Desktop.
get pullrequest from github
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username 'put your username here' | |
token = 'put your personal token from GitHub here, prefeably via ENV VAR' | |
auth = { username: uname, password: token } | |
url = "https://api.github.com/repos/#{owner}/#{repo_name}/pulls?per_page=1&state=all" | |
res = HTTParty.get(url, basic_auth: auth) | |
body = JSON.parse(res.body) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment