Skip to content

Commit

Permalink
Merge pull request #204 from codecov/scott/ai-pr-review-logging
Browse files Browse the repository at this point in the history
Add log line when triggering AI PR review task
  • Loading branch information
scott-codecov authored Dec 5, 2023
2 parents a404e8e + a2768fa commit 58c31fa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tasks/sync_pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ async def run_async_within_lock(
"pull_updated": False,
"reason": "not_in_provider",
}
if read_yaml_field(current_yaml, ("ai_pr_review", "enabled"), False):
if pull.state == "open" and read_yaml_field(
current_yaml, ("ai_pr_review", "enabled"), False
):
log.info(
"Triggering AI PR review task", extra=dict(repoid=repoid, pullid=pullid)
)
self.app.tasks["app.tasks.ai_pr_review.AiPrReview"].apply_async(
kwargs=dict(repoid=repoid, pullid=pullid)
)
Expand Down

0 comments on commit 58c31fa

Please sign in to comment.