Spaces:
Sleeping
Sleeping
Update pr_fetcher.py
Browse files- pr_fetcher.py +1 -1
pr_fetcher.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
import requests
|
| 2 |
|
| 3 |
def fetch_pr_diff(owner, repo, pr_number, token=None):
|
| 4 |
-
url = f"https://api.github.com/repos/{owner}/{repo}/pulls/{pr_number}"
|
| 5 |
headers = {
|
| 6 |
"Accept": "application/vnd.github.v3.diff"
|
| 7 |
}
|
| 8 |
if token:
|
| 9 |
headers["Authorization"] = f"token {token}"
|
| 10 |
|
|
|
|
| 11 |
response = requests.get(url, headers=headers)
|
| 12 |
|
| 13 |
if response.status_code == 200:
|
|
|
|
| 1 |
import requests
|
| 2 |
|
| 3 |
def fetch_pr_diff(owner, repo, pr_number, token=None):
|
|
|
|
| 4 |
headers = {
|
| 5 |
"Accept": "application/vnd.github.v3.diff"
|
| 6 |
}
|
| 7 |
if token:
|
| 8 |
headers["Authorization"] = f"token {token}"
|
| 9 |
|
| 10 |
+
url = f"https://api.github.com/repos/{owner}/{repo}/pulls/{pr_number}"
|
| 11 |
response = requests.get(url, headers=headers)
|
| 12 |
|
| 13 |
if response.status_code == 200:
|