Skip to content

Commit 821bbd0

Browse files
committed
fix: suppress noisy logs in helper function for release note generator
1 parent ed56fd7 commit 821bbd0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/release-note-generation/generate_module_notes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ def find_version_boundaries(file_path, pattern, target_version, module=None):
3636
prev_version = None
3737

3838
for commit in commits:
39+
# Check if file exists at that commit to avoid noisy errors
40+
check_cmd = ["git", "cat-file", "-e", f"{commit}:{file_path}"]
41+
check_result = subprocess.run(check_cmd, stderr=subprocess.PIPE)
42+
if check_result.returncode != 0:
43+
continue
44+
3945
show_cmd = ["git", "show", f"{commit}:{file_path}"]
4046
try:
4147
content = run_cmd(show_cmd)

0 commit comments

Comments
 (0)