We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c373d72 + 991b995 commit 0eccb1cCopy full SHA for 0eccb1c
post/clang_tidy_review/clang_tidy_review/__init__.py
@@ -286,14 +286,17 @@ def pull_request(self):
286
self._pull_request = self.repo.get_pull(int(self.pr_number))
287
return self._pull_request
288
289
- def get_pr_diff(self) -> List[unidiff.PatchSet]:
+ def get_pr_diff(self) -> List[unidiff.PatchedFile]:
290
"""Download the PR diff, return a list of PatchedFile"""
291
292
_, data = self.repo._requester.requestJsonAndCheck(
293
"GET",
294
self.pull_request.url,
295
headers={"Accept": f"application/vnd.github.{'v3.diff'}"},
296
)
297
+ if not data:
298
+ return []
299
+
300
diffs = data["data"]
301
302
# PatchSet is the easiest way to construct what we want, but the
0 commit comments