forked from heavy-duty/ceremony
fix: cite release doctrine in both layouts
This commit is contained in:
parent
0bbdb2c6e2
commit
994aeb58aa
2 changed files with 15 additions and 3 deletions
|
|
@ -747,6 +747,9 @@ itself, so a parse unchanged since the last echo never re-posts.*" >/dev/null
|
||||||
esac
|
esac
|
||||||
elif has_issue_label epic; then
|
elif has_issue_label epic; then
|
||||||
if has_issue_label release && ! issue_comment_has_marker "$n" release-init-due; then
|
if has_issue_label release && ! issue_comment_has_marker "$n" release-init-due; then
|
||||||
|
release_doctrine_path=.ceremony/RELEASES.md
|
||||||
|
# Ceremony dogfoods the action but owns doctrine at the repository root (#253).
|
||||||
|
[ "$REPO" != heavy-duty/ceremony ] || release_doctrine_path=RELEASES.md
|
||||||
refs="$(blocked_references <<<"$(jq -r '.body // ""' <<<"$ISSUE_JSON")")"
|
refs="$(blocked_references <<<"$(jq -r '.body // ""' <<<"$ISSUE_JSON")")"
|
||||||
cross_refs="$(blocked_cross_references <<<"$(jq -r '.body // ""' <<<"$ISSUE_JSON")")"
|
cross_refs="$(blocked_cross_references <<<"$(jq -r '.body // ""' <<<"$ISSUE_JSON")")"
|
||||||
states="$(reference_states <<<"$refs")"
|
states="$(reference_states <<<"$refs")"
|
||||||
|
|
@ -760,7 +763,7 @@ itself, so a parse unchanged since the last echo never re-posts.*" >/dev/null
|
||||||
4. Ask the operator to bless the order, then open the first wave.
|
4. Ask the operator to bless the order, then open the first wave.
|
||||||
5. Ship the release, close this epic, and trigger the next window.
|
5. Ship the release, close this epic, and trigger the next window.
|
||||||
|
|
||||||
See \`.ceremony/RELEASES.md\`. The operator blessing the order is the one step this chain never automates."
|
See \`$release_doctrine_path\`. The operator blessing the order is the one step this chain never automates."
|
||||||
log "#$n: release-init due"
|
log "#$n: release-init due"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -416,7 +416,7 @@ issue_stub_gh() {
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
printf '%s\n----\n' "$body" >>"$TMP/posted-$n"
|
printf '%s\n----\n' "$body" >>"$TMP/posted-$n"
|
||||||
file="$TMP/repos_owner_repo_issues_${n}_comments.json"
|
file="$TMP/$(printf 'repos/%s/issues/%s/comments' "$REPO" "$n" | tr / _).json"
|
||||||
[ -f "$file" ] || printf '[]\n' >"$file"
|
[ -f "$file" ] || printf '[]\n' >"$file"
|
||||||
jq --arg b "$body" --arg at "$(iso_at "$INOW")" \
|
jq --arg b "$body" --arg at "$(iso_at "$INOW")" \
|
||||||
'. + [{"user":{"login":"sweep-bot"},"created_at":$at,"html_url":"https://x/posted","body":$b}]' \
|
'. + [{"user":{"login":"sweep-bot"},"created_at":$at,"html_url":"https://x/posted","body":$b}]' \
|
||||||
|
|
@ -435,7 +435,7 @@ issue_probe() { # $1 issue, $2 labels, $3 assignees, $4 false|closing|refs, $5 m
|
||||||
# only way to prove a rule that self-rate-limits on its own comment's
|
# only way to prove a rule that self-rate-limits on its own comment's
|
||||||
# timestamp (#254): sweep, then sweep again a day later and watch the
|
# timestamp (#254): sweep, then sweep again a day later and watch the
|
||||||
# nudge stay silent because the comment it posted is now the activity.
|
# nudge stay silent because the comment it posted is now the activity.
|
||||||
REPO=owner/repo NOW="${PROBE_NOW:-$INOW}"
|
REPO="${PROBE_REPO:-owner/repo}" NOW="${PROBE_NOW:-$INOW}"
|
||||||
ISSUE_LABELS="$2"
|
ISSUE_LABELS="$2"
|
||||||
ISSUE_JSON="$(jq -n --arg at "$(iso_at $((INOW - 10 * 86400)))" \
|
ISSUE_JSON="$(jq -n --arg at "$(iso_at $((INOW - 10 * 86400)))" \
|
||||||
--argjson assignees "$assignee_json" --arg body "$body" \
|
--argjson assignees "$assignee_json" --arg body "$body" \
|
||||||
|
|
@ -497,6 +497,15 @@ check "an announced gate does not re-read its durable blockers" 0 \
|
||||||
"$release_init_gate_reads_before_repeat" \
|
"$release_init_gate_reads_before_repeat" \
|
||||||
grep -cE 'repos/owner/repo/issues/(201|202)$' "$TMP/api-calls"
|
grep -cE 'repos/owner/repo/issues/(201|202)$' "$TMP/api-calls"
|
||||||
|
|
||||||
|
printf '{"state":"closed"}\n' >"$TMP/repos_heavy-duty_ceremony_issues_201.json"
|
||||||
|
printf '{"state":"closed"}\n' >"$TMP/repos_heavy-duty_ceremony_issues_202.json"
|
||||||
|
printf '[]\n' >"$TMP/repos_heavy-duty_ceremony_issues_53_comments.json"
|
||||||
|
PROBE_REPO=heavy-duty/ceremony \
|
||||||
|
issue_probe 53 $'epic\nrelease' 0 false "" "$release_init_body" >/dev/null
|
||||||
|
# shellcheck disable=SC2016 # backticks are the literal dogfood doctrine citation
|
||||||
|
check "the ceremony dogfood announce cites its root doctrine path" 0 "" \
|
||||||
|
grep -qF 'See `RELEASES.md`.' "$TMP/posted-53"
|
||||||
|
|
||||||
printf '[]\n' >"$(cfix 54)"
|
printf '[]\n' >"$(cfix 54)"
|
||||||
issue_probe 54 $'epic\nrelease' 0 false "" \
|
issue_probe 54 $'epic\nrelease' 0 false "" \
|
||||||
$'Blocked by #203.\n\n## Task list\n- [x] #201 complete' >/dev/null
|
$'Blocked by #203.\n\n## Task list\n- [x] #201 complete' >/dev/null
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue