Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
add debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
genisd committed Sep 7, 2023
1 parent 4ba525f commit a987183
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pr_agent/servers/github_action_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,21 @@ async def run_action():
print(f"Failed to parse JSON: {e}")
return

print('handling ' + GITHUB_EVENT_NAME + ' event')
# Handle pull request event
if GITHUB_EVENT_NAME == "pull_request":
action = event_payload.get("action")
print('handling ' + action + ' action')
if action in ["opened", "reopened", "synchronize", "ready_for_review"]:
pr_url = event_payload.get("pull_request", {}).get("url")
if pr_url:
print('doing review of pr url:' + pr_url)
await PRReviewer(pr_url).run()

# Handle issue comment event
elif GITHUB_EVENT_NAME == "issue_comment":
action = event_payload.get("action")
print('handling ' + action + ' action')
if action in ["created", "edited"]:
comment_body = event_payload.get("comment", {}).get("body")
if comment_body:
Expand Down

0 comments on commit a987183

Please sign in to comment.