Skip to content

Commit

Permalink
fixup! Test when running as script
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeweerd committed Jan 16, 2024
1 parent d18cceb commit 309b522
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions logToCs.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,20 +161,25 @@ def submit( # pylint: disable=too-many-arguments
}
if title is not None:
output["title"] = title
if summary is not None:
output["summary"] = summary
if text is not None:
output["text"] = text

payload = {
"name": "log-to-pr-annotation",
"head_sha": self.head_sha,
"status": "completed",
"conclusion": conclusion,
"completed_at": dt.datetime.now(dt.timezone.utc).isoformat(),
"output": output,
}

if conclusion is not None:
payload["conclusion"] = conclusion

response = requests.post(
f"{self.URI}/repos/{self.repo_full_name}/check-runs",
f"{self.URI}/repos/{self.repo_full_name}/check-runs"
f"/{self.head_sha}",
headers={
"Accept": self.ACCEPT_HEADER_VALUE,
"Authorization": self.AUTH_HEADER_VALUE,
Expand Down

0 comments on commit 309b522

Please sign in to comment.