MCPcopy Create free account
hub / github.com/ipython/ipython / get_pull_request

Function get_pull_request

tools/gh_api.py:107–118  ·  view source on GitHub ↗

get pull request info by number

(project, num, auth=False)

Source from the content-addressed store, hash-verified

105 return response_data['html_url']
106
107def get_pull_request(project, num, auth=False):
108 """get pull request info by number
109 """
110 url = "https://api.github.com/repos/{project}/pulls/{num}".format(project=project, num=num)
111 if auth:
112 header = make_auth_header()
113 else:
114 header = None
115 print("fetching %s" % url, file=sys.stderr)
116 response = requests.get(url, headers=header)
117 response.raise_for_status()
118 return json.loads(response.text, object_hook=Obj)
119
120def get_pull_request_files(project, num, auth=False):
121 """get list of files in a pull request"""

Callers 3

backport_prFunction · 0.90
should_backportFunction · 0.90
split_pullsFunction · 0.90

Calls 2

make_auth_headerFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected