Skip to content

Commit

Permalink
changed check: now a file must end with .obo and .xlsx or .include. .…
Browse files Browse the repository at this point in the history
…obo.obselete or similar are not allowed, anymore.
  • Loading branch information
Zerskk committed Feb 1, 2024
1 parent f5e2bf4 commit 2f69d96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/api/endpoints/webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ async def ontology(request: Request, payload: PushWebhookPayload):

for filename in update_files:
print("filename", filename)
if ".obo" in filename:
if filename.endswith(".obo"):
update_urls.append(github_api.convert_to_raw_url(filename, branch))

if ".include" in filename:
if filename.endswith(".include"):
url_tuple = (github_api.convert_to_raw_url(filename, payload.before),
github_api.convert_to_raw_url(filename, payload.after))
include_urls.append(url_tuple)
Expand Down Expand Up @@ -207,7 +207,7 @@ async def template(request: Request, payload: PushWebhookPayload):

for url in update_urls:
print("current url", url)
if ".xlsx" in filename:
if filename.endswith(".xlsx"):
# chain(add_ontology_task.s(url), update_ontologies.s()).apply_async()
# add_template_custom.delay(url, notifications_json)
# chain(add_template_custom.s(url, notifications=notifications_json), send_webhook_mail.s()).apply_async()
Expand Down

0 comments on commit 2f69d96

Please sign in to comment.