Skip to content

Commit 2b6487c

Browse files
macdiceCommitfest Bot
authored andcommitted
Add some more logging of webhooks.
1 parent b4b6868 commit 2b6487c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cfbot_github.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,19 +805,23 @@ def handle_push_webhook(conn, event):
805805
if repo != cfbot_config.GITHUB_MIRROR_FULL_REPO:
806806
# We only mirror branches from postgres/postgres (which is itself a
807807
# mirror of the actual self-hosted postgresql.org repo).
808+
logging.info("ignoring push event from repo %s", repo)
808809
return
809810
ref = event["ref"]
810811
if not ref.startswith("refs/heads/"):
811812
# We don't mirror refs/tag/... should we?
813+
logging.info("ignoring push event from repo %s ref %s", repo, ref)
812814
return
813815
branch = ref[11:]
814816
if not re.match(cfbot_config.GITHUB_MIRROR_BRANCH_PATTERN, branch):
815817
# Only mirror branches that match our configured pattern (though
816818
# we don't actually expect postgres/postgres to have any non-matching
817819
# branches).
820+
logging.info("ignoring push event from repo %s branch %s", repo, branch)
818821
return
819822
cursor = conn.cursor()
820823
# Actual mirroring work is handed off to a cfbot worker.
824+
logging.info("will mirror repo %s branch %s", repo, branch)
821825
cfbot_work_queue.insert_work_queue(cursor, "push-mirror-branch", branch)
822826

823827

0 commit comments

Comments
 (0)