You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c35b098
Browse filesBrowse the repository at this point in the historyBrowse files
ci(half-state-patrol): declared opt-in for a board with no anchor issue
The composite action gains one input, `anchor-optional`, default `false`.
Declared `true`, an empty `anchor-issue` gives a ::notice::, exit 0, and the
findings in the run summary only; the anchor PATCH is skipped through the
resolve step's `configured` output. Left at the default, the empty-anchor
::error:: and exit 1 are unchanged. A non-numeric anchor fails in both modes,
and a value other than true or false is refused on every event.
objectstack's own caller keeps the default; its prose names the input for
sibling installs.
Claude-Session: https://claude.ai/code/session_01TdiauJaVCHuj45EzZGUxHh
Co-authored-by: Claude <noreply@anthropic.com>
# is refused rather than read as `false`, because a misspelt `true` read
239
+
# that way goes red with the no-anchor error, which names the wrong
240
+
# remedy.
241
+
case "$ANCHOR_OPTIONAL_IN" in
242
+
true|True|TRUE) anchor_optional=true ;;
243
+
false|False|FALSE) anchor_optional=false ;;
244
+
*)
245
+
echo "::error::The 'anchor-optional' input is '$ANCHOR_OPTIONAL_IN'. It takes true or false: true when this repository's board has no anchor issue by decision, false (the default) otherwise."
if [ -z "${ANCHOR_ISSUE//[[:space:]]/}" ] && [ "$ANCHOR_OPTIONAL" = true ]; then
370
+
echo "configured=false" >> "$GITHUB_OUTPUT"
371
+
echo "::notice::No anchor issue configured for ${{ github.repository }}, which is a supported configuration for this caller: it declares 'anchor-optional: true' on the half-state-patrol action. The sweep RAN and its rendered body is in this run's summary; nothing was written to any issue, and the missing anchor does not fail this run. To deliver findings to a pinned issue instead, open a \`tracking\`-labeled anchor issue in this repo and pass its number as the 'anchor-issue' input."
372
+
exit 0
373
+
fi
313
374
if [ -z "${ANCHOR_ISSUE//[[:space:]]/}" ]; then
314
375
echo "::error::No anchor issue configured for ${{ github.repository }}. The sweep RAN (see the run summary) but has nowhere to land. Open a \`tracking\`-labeled anchor issue in this repo and pass its number as the 'anchor-issue' input of the half-state-patrol action."
315
376
exit 1
316
377
fi
317
378
case "$ANCHOR_ISSUE" in
318
379
*[!0-9]*|'') echo "::error::The 'anchor-issue' input is '$ANCHOR_ISSUE', which is not an issue number."; exit 1 ;;
319
380
esac
381
+
echo "configured=true" >> "$GITHUB_OUTPUT"
320
382
echo "anchor: #$ANCHOR_ISSUE in ${{ github.repository }}"
321
383
322
384
- name: Update the pinned anchor issue
323
-
# A pull_request run proves the sweep; it must not touch the board.
324
-
if: github.event_name != 'pull_request'
385
+
# A pull_request run proves the sweep; it must not touch the board. And a
386
+
# declared anchor-less install has no board write to attempt: the guard
387
+
# reads the resolve step's OUTPUT rather than testing the input again.
if [ "${{ github.event_name }}" = "pull_request" ]; then
402
466
echo "_Anchor write skipped: a pull_request run proves the sweep without touching the board._"
403
467
echo
468
+
elif [ "${{ steps.anchor.outputs.configured }}" = "false" ]; then
469
+
# ⛔ Only on the EXPLICIT not-configured reading. An empty anchor
470
+
# without the opt-in, or a non-numeric one, sets no output and fails
471
+
# the run, and must not be described here as "nothing was asked for".
472
+
echo "_No anchor issue configured (\`anchor-optional\` is on and \`anchor-issue\` is empty): this summary is the ONLY delivery of the findings below — it notifies nobody, by accepted trade. Pass a \`tracking\` issue's number as \`anchor-issue\` to have them land on a pinned card instead._"
0 commit comments