Skip to content

Commit 32e671d

Browse files
committed
fix: Fix NUM_ENDSTOP_STATES with Z_MIN_PROBE = Z_MIN by tombrazier (MarlinFirmware#27190)
fix: Fix case TRRunaway by Scott Lahteine (ad112b4)
1 parent 0ea0ab7 commit 32e671d

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

process_commits.py

+19-8
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,31 @@ def process_commits():
1212

1313
processed = []
1414
for line in commits:
15+
# Skip [cron] commits
16+
if '[cron]' in line:
17+
continue
18+
19+
line = line.strip()
1520
# Extract the commit hash
16-
match = re.search(r'\(([a-f0-9]+)\)$', line.strip())
21+
match = re.search(r'\(([a-f0-9]+)\)$', line)
1722
if match:
1823
commit_hash = match.group(1)
1924
author = get_author_for_commit(commit_hash)
2025

21-
# Check if line ends with issue number
22-
if re.search(r'\(#\d+\)$', line.strip()):
23-
# Remove the commit hash since we have an issue number
24-
new_line = line.strip()[:-9] + f" by {author}" + line.strip()[-9:]
26+
# Remove the commit hash from the end
27+
line = line[:-len(commit_hash)-3]
28+
29+
# Check if line contains issue/PR number
30+
pr_match = re.search(r'\(#\d+\)$', line)
31+
if pr_match:
32+
# Format with PR number
33+
pr_num = pr_match.group()
34+
line = line[:-len(pr_num)] + f"by {author} {pr_num}"
2535
else:
26-
# Keep the commit hash since there's no issue number
27-
new_line = line.strip()[:-8] + f" by {author} " + line.strip()[-8:]
28-
processed.append(new_line)
36+
# Format with commit hash
37+
line = line.strip() + f"by {author} ({commit_hash})"
38+
39+
processed.append(line)
2940

3041
# Write processed commits
3142
with open('commits.txt', 'w') as f:

0 commit comments

Comments
 (0)