Commit 39fb8c1
fix(ci): don't validate company files a PR removed
The Validate Company Profiles workflow built its file list from
`gh pr diff --name-only`, which reports both the old and new path
when a PR renames a company profile. The old path is absent from the
sparse pr-head checkout, so validate-companies.js failed with ENOENT
and blocked the PR over a file it had legitimately deleted. Any PR
removing a profile hit the same wall.
List changed files through the pulls API instead and drop entries with
status "removed", so only files present in the checkout are validated.
Verified against #2247 (rename -> yields only the added file) and
#2249 (edit -> unchanged behaviour).
Also guards the mapping loop with a warning rather than a silent skip,
and short-circuits cleanly when nothing is left to validate.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMca9WXKJAriMEfghGw1eT1 parent a4ff145 commit 39fb8c1
4 files changed
Lines changed: 37 additions & 4 deletions
File tree
- .github/workflows
- src/_data
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
| |||
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
67 | 81 | | |
68 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
69 | 91 | | |
70 | 92 | | |
71 | 93 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
2 | 13 | | |
3 | 14 | | |
4 | 15 | | |
| |||
0 commit comments