@biffo/cli 0.298.11 → 0.298.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/branch-health.sh +64 -30
package/package.json
CHANGED
package/scripts/branch-health.sh
CHANGED
|
@@ -58,26 +58,41 @@
|
|
|
58
58
|
# `Deploy Infrastructure` dispatch left at the default `action: plan` really did
|
|
59
59
|
# succeed at planning, and that can be entirely deliberate (an operator running
|
|
60
60
|
# a dry run). What it must never do is share the plain `ok` label a real apply
|
|
61
|
-
# gets: `conclusion` is "success" either way, so the ONLY signal that
|
|
62
|
-
# apart
|
|
63
|
-
# `PLAN ONLY ... (nothing applied)` marker for exactly
|
|
64
|
-
# CLOSED on that signal going missing — see the summary
|
|
65
|
-
# `displayTitle`'s absence collapses the whole `gh run list`
|
|
66
|
-
# output, which is already handled as exit 2 ("cannot tell"), not
|
|
67
|
-
# `ok`.
|
|
61
|
+
# gets: `conclusion` is "success" either way, so the ONLY signal that told them
|
|
62
|
+
# apart, on the OLD `deploy-infra.yml`, was the run's own title (`displayTitle`),
|
|
63
|
+
# which #1678 made carry a `PLAN ONLY ... (nothing applied)` marker for exactly
|
|
64
|
+
# this. This script fails CLOSED on that signal going missing — see the summary
|
|
65
|
+
# query below, where `displayTitle`'s absence collapses the whole `gh run list`
|
|
66
|
+
# call to empty output, which is already handled as exit 2 ("cannot tell"), not
|
|
67
|
+
# as a silent `ok`.
|
|
68
68
|
#
|
|
69
|
-
# **This bucket is transitional, and
|
|
70
|
-
# `deploy-infra.yml` can no longer produce a
|
|
71
|
-
# input is required, defaults to nothing,
|
|
72
|
-
#
|
|
73
|
-
#
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
-
#
|
|
77
|
-
#
|
|
78
|
-
#
|
|
79
|
-
#
|
|
80
|
-
#
|
|
69
|
+
# **This bucket is transitional, and the title-marker half is deliberately
|
|
70
|
+
# kept.** From core 0.298.0 `deploy-infra.yml` can no longer produce a
|
|
71
|
+
# plan-only run at all: its `action` input is required, defaults to nothing,
|
|
72
|
+
# and accepts only `apply` (#1700), so the dispatch that used to yield this
|
|
73
|
+
# title is now an HTTP 422. The title-marker branch is therefore permanently
|
|
74
|
+
# unreachable **for any repo past 0.298.0** — but this script is run with `-R
|
|
75
|
+
# owner/repo` against arbitrary repos in the estate, and an instance that has
|
|
76
|
+
# not yet taken that upgrade still emits exactly this title for exactly the
|
|
77
|
+
# ambiguous run. Deleting it now would fail open on those repos. Retire it
|
|
78
|
+
# once every instance is past 0.298.0, and check the `Instance Adoption
|
|
79
|
+
# Report` workflow (`.github/workflows/instance-adoption-report.yml`) rather
|
|
80
|
+
# than assuming.
|
|
81
|
+
#
|
|
82
|
+
# **Previews now live in their own workflow, and #1702 is that half.** A
|
|
83
|
+
# preview dispatch is `deploy-infra-plan.yml` — a workflow with NO apply job
|
|
84
|
+
# at all, ever, so its `conclusion: success` can only ever mean "the plan
|
|
85
|
+
# computed cleanly", never "something was applied" (see that file's own
|
|
86
|
+
# header). Its `run-name` says `... (preview only)`, not `PLAN ONLY`, so the
|
|
87
|
+
# title-marker check above never fires for it — it would render as plain
|
|
88
|
+
# `ok` otherwise, identical to a real apply, which is the exact ambiguity
|
|
89
|
+
# #1582 exists to remove. Detected instead by `workflowName`, which is
|
|
90
|
+
# structural: it is the workflow's own `name:` field, reported by every `gh
|
|
91
|
+
# run list` call with no extra authoring effort, rather than a marker string
|
|
92
|
+
# someone has to remember to keep embedded in one specific templated field. A
|
|
93
|
+
# repo would have to rename the workflow itself — a change everyone touching
|
|
94
|
+
# it would see in the Actions UI — to lose this signal, unlike a run-name
|
|
95
|
+
# template that can silently stop emitting a substring nobody is watching for.
|
|
81
96
|
#
|
|
82
97
|
# ## Usage
|
|
83
98
|
#
|
|
@@ -92,7 +107,13 @@ BRANCH=""
|
|
|
92
107
|
QUIET=""
|
|
93
108
|
|
|
94
109
|
usage() {
|
|
95
|
-
|
|
110
|
+
# #1582's own issue title warned "keep --help's line-range in step with the
|
|
111
|
+
# growing header" — and #1702's header growth immediately re-triggered it:
|
|
112
|
+
# this range was still '2,73p', 28 lines short of the header's real end
|
|
113
|
+
# (line 101, just above `set -uo pipefail`), so --help was truncating
|
|
114
|
+
# mid-sentence in the middle of the (now even longer) plan-only section.
|
|
115
|
+
# Fixed to the current end rather than left to drift again next time.
|
|
116
|
+
sed -n '2,101p' "$0" | sed 's/^# \{0,1\}//'
|
|
96
117
|
exit 2
|
|
97
118
|
}
|
|
98
119
|
|
|
@@ -206,16 +227,29 @@ while IFS="$TAB" read -r state name sha when url event title; do
|
|
|
206
227
|
[ -n "$name" ] || continue
|
|
207
228
|
case "$state" in
|
|
208
229
|
success)
|
|
209
|
-
#
|
|
210
|
-
#
|
|
211
|
-
#
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
230
|
+
# Two independent plan-only signals, checked in order — #1702's
|
|
231
|
+
# structural one first, then #1582's legacy title marker. Either one
|
|
232
|
+
# routes the run away from the plain "ok" bucket a real apply gets.
|
|
233
|
+
case "$name" in
|
|
234
|
+
"Deploy Infrastructure Plan")
|
|
235
|
+
# The workflow's own `name:` (deploy-infra-plan.yml line 1) — this
|
|
236
|
+
# workflow has no apply job at all, so a "success" here can only
|
|
237
|
+
# mean the plan computed cleanly, never that something applied.
|
|
238
|
+
planonly="${planonly}${name}\n"
|
|
239
|
+
;;
|
|
240
|
+
*)
|
|
241
|
+
# A literal, upper-case "PLAN ONLY" is the #1678 run-name marker
|
|
242
|
+
# (`format('PLAN ONLY {0} (nothing applied)', ...)`) — never something
|
|
243
|
+
# a commit-subject-derived title produces by coincidence (this repo's
|
|
244
|
+
# own history has "plan-only" and "plan-time" in commit subjects,
|
|
245
|
+
# always lower-case, and grep confirms zero for the exact upper-case
|
|
246
|
+
# phrase). Kept for repos on `deploy-infra.yml` pre-#1700, which can
|
|
247
|
+
# still emit it — see the header for why this stays.
|
|
248
|
+
case "$title" in
|
|
249
|
+
*"PLAN ONLY"*) planonly="${planonly}${name}\n" ;;
|
|
250
|
+
*) ok="${ok}${name}\n" ;;
|
|
251
|
+
esac
|
|
252
|
+
;;
|
|
219
253
|
esac
|
|
220
254
|
;;
|
|
221
255
|
failure | timed_out | startup_failure)
|