File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -374,6 +374,7 @@ def update_comment(
374374 if comment .comment_url is not None :
375375 response = github .patch (comment .comment_url , json = {'body' : _to_api_payload (new_comment )})
376376 response .raise_for_status ()
377+ comment .node_id = response .json ().get ('node_id' )
377378 else :
378379 response = github .post (comment .issue_url + '/comments' , json = {'body' : _to_api_payload (new_comment )})
379380 response .raise_for_status ()
@@ -388,6 +389,10 @@ def hide_comment(
388389 classifier : str
389390) -> None :
390391
392+ if comment .node_id is None :
393+ debug ('Comment has unknown node_id - not hiding' )
394+ return
395+
391396 graphql_url = os .environ .get ('GITHUB_GRAPHQL_URL' , f'{ os .environ ["GITHUB_API_URL" ]} /graphql' )
392397
393398 response = github .post (
You can’t perform that action at this time.
0 commit comments