MCPcopy Create free account
hub / github.com/apache/storm / pulls

Method pulls

dev-tools/github/__init__.py:105–120  ·  view source on GitHub ↗
(self, user, repo, type="all")

Source from the content-addressed store, hash-verified

103 self.headers["Authorization"] = "Basic " + authstr
104
105 def pulls(self, user, repo, type="all"):
106 page = 1
107 ret = []
108 while True:
109 url = f"https://api.github.com/repos/{user}/{repo}/pulls?state={type}&page={page}"
110 req = urllib.request.Request(url, None, self.headers)
111 result = urllib.request.urlopen(req)
112 contents = result.read().decode()
113 if result.getcode() != 200:
114 raise Exception(result.getcode() + " != 200 " + contents)
115 got = json.loads(contents)
116 for part in got:
117 ret.append(GitPullRequest(part, self))
118 if len(got) == 0:
119 return ret
120 page = page + 1
121
122 def open_pulls(self, user, repo):
123 return self.pulls(user, repo, "open")

Callers 1

open_pullsMethod · 0.95

Calls 4

GitPullRequestClass · 0.85
appendMethod · 0.80
decodeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected