Skip to content

Commit 0b03c2e

Browse files
committed
ci: Fix PR detection -3
Signed-off-by: Chaitanya Tata <[email protected]>
1 parent 4121ee5 commit 0b03c2e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/module-monitor.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,16 @@ jobs:
116116
# Fallback: return basic info
117117
return {'hash': commit_hash[:7] if commit_hash != "Unknown" else "Unknown"}
118118
119-
def get_commit_status(commit_hash):
119+
def get_commit_status(commit_hash, new_module_file='new_module.yml'):
120120
"""Get commit status and branch information"""
121121
try:
122122
import subprocess
123123
import os
124124
import re
125125
126-
# First, check if we have PR metadata in the module.yml file
126+
# First, check if we have PR metadata in the new module.yml file
127127
try:
128-
with open('zephyr/module.yml', 'r') as f:
128+
with open(new_module_file, 'r') as f:
129129
content = f.read()
130130
print(f"DEBUG: Looking for PR metadata in module.yml for commit {commit_hash}", file=sys.stderr)
131131
print(f"DEBUG: Module.yml content starts with: {content[:200]}", file=sys.stderr)
@@ -238,8 +238,8 @@ jobs:
238238
239239
# Format commit display with PR detection
240240
print(f"DEBUG: Processing {path} - old_commit: {old_commit_hash}, new_commit: {new_commit_hash}", file=sys.stderr)
241-
old_commit_status = get_commit_status(old_commit_hash)
242-
new_commit_status = get_commit_status(new_commit_hash)
241+
old_commit_status = get_commit_status(old_commit_hash, 'old_module.yml')
242+
new_commit_status = get_commit_status(new_commit_hash, 'new_module.yml')
243243
old_commit_display = old_commit_status['display']
244244
new_commit_display = new_commit_status['display']
245245
print(f"DEBUG: {path} - old_display: {old_commit_display}, new_display: {new_commit_display}", file=sys.stderr)

0 commit comments

Comments
 (0)