|
22 | 22 |
|
23 | 23 | - name: Fetch PR head |
24 | 24 | run: | |
25 | | - git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-head |
| 25 | + git fetch origin pull/${{ github.event.pull_request_target.number }}/head:pr-head |
26 | 26 |
|
27 | 27 | - name: Setup sdk-nrfxlib repository |
28 | 28 | run: | |
|
55 | 55 | git log --oneline -5 >&2 |
56 | 56 | |
57 | 57 | # Get old and new module.yml content |
| 58 | + echo "DEBUG: Getting old module.yml from $BASE_REF" >&2 |
58 | 59 | git show $BASE_REF:zephyr/module.yml > old_module.yml |
59 | | - git show $HEAD_REF:zephyr/module.yml > new_module.yml |
| 60 | + echo "DEBUG: Getting new module.yml from pr-head" >&2 |
| 61 | + git show pr-head:zephyr/module.yml > new_module.yml |
| 62 | + |
| 63 | + echo "DEBUG: Old module.yml content:" >&2 |
| 64 | + head -5 old_module.yml >&2 |
| 65 | + echo "DEBUG: New module.yml content:" >&2 |
| 66 | + head -5 new_module.yml >&2 |
60 | 67 | |
61 | 68 | # Parse YAML and generate comparison table |
62 | 69 | echo "DEBUG: Starting Python script..." >&2 |
@@ -218,9 +225,9 @@ jobs: |
218 | 225 | old_commit_status = get_commit_status(old_commit_hash) |
219 | 226 | new_commit_status = get_commit_status(new_commit_hash) |
220 | 227 | |
221 | | - # Format commit display |
222 | | - old_commit_display = old_commit_status['display'] |
223 | | - new_commit_display = new_commit_status['display'] |
| 228 | + # Format commit display - simplify for better table formatting |
| 229 | + old_commit_display = old_commit_hash[:7] if old_commit_hash != "Unknown" else "Unknown" |
| 230 | + new_commit_display = new_commit_hash[:7] if new_commit_hash != "Unknown" else "Unknown" |
224 | 231 | |
225 | 232 | diff_link = generate_diff_link(old_blob.get('url', ''), new_blob.get('url', '')) |
226 | 233 | |
@@ -252,7 +259,23 @@ jobs: |
252 | 259 | diff_content.append("All firmware blobs remain unchanged in this PR.") |
253 | 260 | diff_content.append("") |
254 | 261 | diff_content.append("### Current Firmware Blob Summary:") |
255 | | - diff_content.extend(table_rows[2:]) # Skip header rows |
| 262 | + # Create a simplified summary table without the comparison columns |
| 263 | + summary_rows = [] |
| 264 | + summary_rows.append("| Variant | Version | Commit |") |
| 265 | + summary_rows.append("|---------|---------|--------|") |
| 266 | + |
| 267 | + for path in sorted(all_paths): |
| 268 | + new_blob = new_blobs.get(path, {}) |
| 269 | + version = new_blob.get('version', 'N/A') |
| 270 | + commit_hash = extract_commit_from_url(new_blob.get('url', '')) |
| 271 | + commit_display = commit_hash[:7] if commit_hash != "Unknown" else "Unknown" |
| 272 | + |
| 273 | + # Extract variant name from path |
| 274 | + variant = path.split('/')[-2] if '/' in path else path |
| 275 | + |
| 276 | + summary_rows.append(f"| {variant} | {version} | {commit_display} |") |
| 277 | + |
| 278 | + diff_content.extend(summary_rows) |
256 | 279 | |
257 | 280 | # Write to file for GitHub Actions output |
258 | 281 | print(f"DEBUG: Writing {len(diff_content)} lines to diff_output.txt", file=sys.stderr) |
|
0 commit comments