Skip to content

Commit 2060106

Browse files
committed
Rename webhook handling functions.
A bit clearer this way.
1 parent d211b31 commit 2060106

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

cfbot_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ def github_webhook():
4646
logging.info("could not decode JSON: %s", request.get_data(as_text=True))
4747
raise
4848
if event_type == "workflow_job":
49-
cfbot_github.ingest_workflow_job(conn, event)
49+
cfbot_github.handle_workflow_job_webhook(conn, event)
5050
conn.commit()
5151
return "OK"
5252
elif event_type == "workflow_run":
53-
cfbot_github.ingest_workflow_run(conn, event)
53+
cfbot_github.handle_workflow_run_webhook(conn, event)
5454
conn.commit()
5555
return "OK"
5656
else:

cfbot_github.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ def refresh_build_status_statistics(conn):
773773
# ======================================================================
774774

775775

776-
def ingest_workflow_run(conn, event):
776+
def handle_workflow_run_webhook(conn, event):
777777
repo = event["repository"]["full_name"]
778778
run_id = event["workflow_run"]["id"]
779779
run_attempt = event["workflow_run"]["run_attempt"]
@@ -786,7 +786,7 @@ def ingest_workflow_run(conn, event):
786786
ingest_build(conn, build_id, commit_id, branch_name, build_status, "webhook")
787787

788788

789-
def ingest_workflow_job(conn, event):
789+
def handle_workflow_job_webhook(conn, event):
790790
repo = event["repository"]["full_name"]
791791
run_id = event["workflow_job"]["run_id"]
792792
run_attempt = event["workflow_job"]["run_attempt"]

0 commit comments

Comments
 (0)