From 11f5f7683c51bb28d3c2349230564882847d82e3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 14 Oct 2025 13:32:21 -1000 Subject: [PATCH] tidy --- script/ci_memory_impact_comment.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/script/ci_memory_impact_comment.py b/script/ci_memory_impact_comment.py index 69f703bd78..af8449aa99 100755 --- a/script/ci_memory_impact_comment.py +++ b/script/ci_memory_impact_comment.py @@ -115,10 +115,10 @@ def find_existing_comment(pr_number: str) -> str | None: pr_number: PR number Returns: - Comment ID if found, None otherwise + Comment numeric ID (databaseId) if found, None otherwise """ try: - # List all comments on the PR + # List all comments on the PR with both id (node ID) and databaseId (numeric ID) result = subprocess.run( [ "gh", @@ -128,7 +128,7 @@ def find_existing_comment(pr_number: str) -> str | None: "--json", "comments", "--jq", - ".comments[]", + ".comments[] | {id, databaseId, body}", ], capture_output=True, text=True, @@ -143,7 +143,8 @@ def find_existing_comment(pr_number: str) -> str | None: try: comment = json.loads(line) if COMMENT_MARKER in comment.get("body", ""): - return str(comment["id"]) + # Return the numeric databaseId, not the node ID + return str(comment["databaseId"]) except json.JSONDecodeError: continue