mirror of
				https://github.com/openSUSE/osc.git
				synced 2025-10-31 19:42:16 +01:00 
			
		
		
		
	Skip binary files in gitea_api.PullRequest.get_patch()
This commit is contained in:
		| @@ -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 | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user