Skip to content

Commit 3a50900

Browse files
committed
Clear existin annotations on same PR
1 parent 2367412 commit 3a50900

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bin/annotation_workflow.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ def find_test_line_number(test_content, test_name):
2929
return i # Return the line number if found
3030
return 1 # Return None if test name is not found
3131

32+
def clear_previous_annotations():
33+
"""
34+
Clear previous GitHub action annotations.
35+
"""
36+
print("::remove-matcher owner=me::")
37+
3238
# Specify the path to the JSON file using pathlib.Path
3339
json_file_path = Path("bin/specification_urls.json")
3440

@@ -62,6 +68,8 @@ def find_test_line_number(test_content, test_name):
6268
url = urls["iso"].format(spec=spec, section=section)
6369
else:
6470
url = urls[spec].format(spec=spec, section=section)
71+
72+
clear_previous_annotations()
6573
print(github_action_notice(file_path, url, line_number))
6674

6775
except json.JSONDecodeError:

0 commit comments

Comments
 (0)