Spaces:
Runtime error
Runtime error
derek-thomas
commited on
Commit
·
c9245bc
1
Parent(s):
a3aae95
Fixing old access type
Browse files
app.py
CHANGED
@@ -83,7 +83,7 @@ async def community(payload: WebhookPayload, task_queue: BackgroundTasks):
|
|
83 |
|
84 |
# No need to run for README updates
|
85 |
try:
|
86 |
-
commit_files_url = f"""{payload.repo.url.api}/compare/{payload.updatedRefs[
|
87 |
response_text = requests.get(commit_files_url, headers=build_hf_headers()).text
|
88 |
if 'README.md' in response_text:
|
89 |
return Response("No need to trigger, its a README update.", status_code=status.HTTP_200_OK)
|
|
|
83 |
|
84 |
# No need to run for README updates
|
85 |
try:
|
86 |
+
commit_files_url = f"""{payload.repo.url.api}/compare/{payload.updatedRefs[0].oldSha}..{payload.updatedRefs[0].newSha}?raw=true"""
|
87 |
response_text = requests.get(commit_files_url, headers=build_hf_headers()).text
|
88 |
if 'README.md' in response_text:
|
89 |
return Response("No need to trigger, its a README update.", status_code=status.HTTP_200_OK)
|