Skip to content

Commit

Permalink
Merge pull request #1287 from sweepai/sweep/ignore-check-run-completed
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlu1248 authored Aug 15, 2023
2 parents 954803a + a8180ef commit e961c47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sweepai/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@ async def webhook(raw_request: Request):
logger.info(f"Handling check suite for {request.repository.full_name}")
_, g = get_github_client(request.installation.id)
repo = g.get_repo(request.repository.full_name)
if request.check_run.pull_requests and issue.labels:
issue = repo.get_issue(request.check_run.pull_requests[0].number)
if not any(label.name == "sweep" for label in issue.labels):
return {"success": True}
pull_request = repo.get_pull(request.check_run.pull_requests[0].number)
if (
len(request.check_run.pull_requests) > 0
Expand Down

0 comments on commit e961c47

Please sign in to comment.