We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5f0b5b commit 400de2fCopy full SHA for 400de2f
image/src/github_pr_comment/comment.py
@@ -374,6 +374,7 @@ def update_comment(
374
if comment.comment_url is not None:
375
response = github.patch(comment.comment_url, json={'body': _to_api_payload(new_comment)})
376
response.raise_for_status()
377
+ comment.node_id = response.json().get('node_id')
378
else:
379
response = github.post(comment.issue_url + '/comments', json={'body': _to_api_payload(new_comment)})
380
@@ -388,6 +389,10 @@ def hide_comment(
388
389
classifier: str
390
) -> None:
391
392
+ if comment.node_id is None:
393
+ debug('Comment has unknown node_id - not hiding')
394
+ return
395
+
396
graphql_url = os.environ.get('GITHUB_GRAPHQL_URL', f'{os.environ["GITHUB_API_URL"]}/graphql')
397
398
response = github.post(
0 commit comments