Skip to content

Commit

Permalink
Merge pull request #69 from NixOS/check_run2
Browse files Browse the repository at this point in the history
Fix check_run webhook logic error
  • Loading branch information
Lassulus authored Mar 5, 2024
2 parents 710e525 + 3426052 commit 49cb0f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ def check_run_response(action: str) -> HttpResponse:
def check_run(body: dict[str, Any], settings: Settings) -> HttpResponse:
check_run = CheckRun.from_json(body)
log.debug(
f"Check Run {check_run.name} with commit id {check_run.head_sha} is in state: {check_run.status}"
f"Check Run {check_run.name} with commit id {check_run.head_sha} is in state: {check_run.status} and conclusion: {check_run.conclusion}"
)
if check_run.conclusion == "completed":
if check_run.status == "completed":
db = Database(settings)
log.debug(
f"Check Run {check_run.name} with commit id {check_run.head_sha} is in state: {check_run.status}"
f"Check Run {check_run.name} with commit id {check_run.head_sha} completed"
)
values = db.get(check_run.head_sha)
for value in values:
Expand Down
2 changes: 1 addition & 1 deletion nixpkgs_merge_bot/webhook/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from ..settings import Settings
from . import http_header
from .check_suite import check_run
from .check_run import check_run
from .errors import HttpError
from .issue_comment import issue_comment, review_comment
from .secret import WebhookSecret
Expand Down

0 comments on commit 49cb0f3

Please sign in to comment.