Skip to content

Commit 7c703ce

Browse files
testing
1 parent 2915ad9 commit 7c703ce

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.ci/premerge_advisor_explain.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
import sys
99
import json
1010

11+
# TODO(boomanaiden154): Remove the optional call once we can require Python
12+
# 3.10.
13+
from typing import Optional
14+
1115
import requests
1216
import github
1317
import github.PullRequest
@@ -20,7 +24,7 @@
2024
COMMENT_TAG = "<!--PREMERGE ADVISOR COMMENT: {platform}-->"
2125

2226

23-
def get_comment_id(platform: str, pr: github.PullRequest.PullRequest) -> int | None:
27+
def get_comment_id(platform: str, pr: github.PullRequest.PullRequest) -> Optional[int]:
2428
platform_comment_tag = COMMENT_TAG.format(platform=platform)
2529
for comment in pr.as_issue().get_comments():
2630
if platform_comment_tag in comment.body:
@@ -76,8 +80,10 @@ def main(
7680
if return_code == 0:
7781
with open("comment", "w") as comment_file_handle:
7882
comment = get_comment(
83+
github_token,
84+
pr_number,
7985
":white_check_mark: With the latest revision this PR passed "
80-
"the premerge checks."
86+
"the premerge checks.",
8187
)
8288
if comment["id"]:
8389
json.dump([comment], comment_file_handle)

0 commit comments

Comments
 (0)