@@ -127,17 +127,28 @@ jobs:
127127 try:
128128 with open('zephyr/module.yml', 'r') as f:
129129 content = f.read()
130+ print(f"DEBUG: Looking for PR metadata in module.yml for commit {commit_hash}", file=sys.stderr)
131+ print(f"DEBUG: Module.yml content starts with: {content[:200]}", file=sys.stderr)
132+
130133 # Look for PR metadata comment (more flexible pattern)
131134 pr_match = re.search(r'# Generated from PR #(\d+) \(commit: ([a-f0-9]+)\)', content)
132- if pr_match and (pr_match.group(2) == commit_hash or pr_match.group(2).startswith(commit_hash) or commit_hash.startswith(pr_match.group(2))):
133- pr_number = pr_match.group(1)
134- return {
135- 'display': f"[{commit_hash[:7]}](PR #{pr_number})",
136- 'is_pr': True,
137- 'pr_number': pr_number,
138- 'pr_url': f"https://github.com/nrfconnect/sdk-nrfxlib/pull/{pr_number}"
139- }
140- except:
135+ if pr_match:
136+ print(f"DEBUG: Found PR match: PR #{pr_match.group(1)}, commit {pr_match.group(2)}", file=sys.stderr)
137+ if (pr_match.group(2) == commit_hash or pr_match.group(2).startswith(commit_hash) or commit_hash.startswith(pr_match.group(2))):
138+ pr_number = pr_match.group(1)
139+ print(f"DEBUG: Commit {commit_hash} matches PR #{pr_number}", file=sys.stderr)
140+ return {
141+ 'display': f"[{commit_hash[:7]}](PR #{pr_number})",
142+ 'is_pr': True,
143+ 'pr_number': pr_number,
144+ 'pr_url': f"https://github.com/nrfconnect/sdk-nrfxlib/pull/{pr_number}"
145+ }
146+ else:
147+ print(f"DEBUG: Commit {commit_hash} does not match PR commit {pr_match.group(2)}", file=sys.stderr)
148+ else:
149+ print(f"DEBUG: No PR metadata found in module.yml", file=sys.stderr)
150+ except Exception as e:
151+ print(f"DEBUG: Error reading module.yml: {e}", file=sys.stderr)
141152 pass
142153
143154 # Change to sdk-nrfxlib repository directory
@@ -226,10 +237,12 @@ jobs:
226237 new_commit_status = get_commit_status(new_commit_hash)
227238
228239 # Format commit display with PR detection
240+ print(f"DEBUG: Processing {path} - old_commit: {old_commit_hash}, new_commit: {new_commit_hash}", file=sys.stderr)
229241 old_commit_status = get_commit_status(old_commit_hash)
230242 new_commit_status = get_commit_status(new_commit_hash)
231243 old_commit_display = old_commit_status['display']
232244 new_commit_display = new_commit_status['display']
245+ print(f"DEBUG: {path} - old_display: {old_commit_display}, new_display: {new_commit_display}", file=sys.stderr)
233246
234247 diff_link = generate_diff_link(old_blob.get('url', ''), new_blob.get('url', ''))
235248
0 commit comments