diff --git a/osc/gitea_api/pr.py b/osc/gitea_api/pr.py index 6b303adf..194f9cf6 100644 --- a/osc/gitea_api/pr.py +++ b/osc/gitea_api/pr.py @@ -409,7 +409,11 @@ class PullRequest: :param repo: Name of the repo. :param number: Number of the pull request in the repo. """ - url = conn.makeurl("repos", owner, repo, "pulls", f"{number}.patch") + q = { + "binary": 0, + } + # XXX: .patch suffix doesn't work with binary=0 + url = conn.makeurl("repos", owner, repo, "pulls", f"{number}.diff", query=q) response = conn.request("GET", url) return response.data