Commit 9be72a5
committed
ci: keep both fail-safe paths from aborting instead of refusing
Two fixes from the fourth review on #844. Both are cases where a condition the
code intends to handle deliberately instead killed the step with no explanation.
Read the example matrix from the default branch, not from the verified head. A
Dependabot branch cut before this file existed 404s at its own head, and gh's
non-zero exit aborted the whole step under set -e with a bare "Not Found" rather
than the refusal every other unresolvable condition here gets. Reachable
immediately: confirmed a 404 against #842's current head, and all 69 open
Dependabot PRs branch from a main that predates the file. The default branch is
also the right source of truth — it is repository config, the examples-only guard
means the pull request cannot have changed it, and a pull_request workflow runs the
merge-ref copy, so it is the matrix the run actually used. A failed read or a
malformed file now refuses explicitly.
Stop the selector aborting when nothing under examples/ changed. `grep -oE` exits
1 on no match and pipefail turned that into a red Verify Examples with no
diagnostic, contradicting the fail-safe contract documented at the top of the
script. Reproduced with an empty diff, which is reachable for a stale pull request
whose change already landed through a duplicate. It now emits empty matrices and
exits 0, which the `if: ... != '[]'` guards and the auto-merge job's job-count
check already handle. grep is kept out of the pipeline so `|| true` tolerates only
its no-match status, and the empty case is explicit rather than relying on
`jq -R .` turning an empty string into [""].1 parent 38e46fd commit 9be72a5
2 files changed
Lines changed: 37 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
56 | 73 | | |
57 | 74 | | |
58 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
98 | 114 | | |
99 | 115 | | |
100 | 116 | | |
| |||
0 commit comments