Skip to content

Commit 7cbcdf9

Browse files
committed
ci: Fix PR detection -2
Signed-off-by: Chaitanya Tata <[email protected]>
1 parent 6295120 commit 7cbcdf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/module-monitor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ jobs:
128128
with open('zephyr/module.yml', 'r') as f:
129129
content = f.read()
130130
# Look for PR metadata comment (more flexible pattern)
131-
pr_match = re.search(r'# Generated from PR #(\d+).*?commit: ([a-f0-9]+)', content, re.DOTALL)
132-
if pr_match and pr_match.group(2) == commit_hash:
131+
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))):
133133
pr_number = pr_match.group(1)
134134
return {
135135
'display': f"[{commit_hash[:7]}](PR #{pr_number})",

0 commit comments

Comments
 (0)