docs(609): qualify two comments as non-merge, matching the implementation
Review Low: the module comment and the _edit_trailer_armed summary still said "a commit message ... does arm" / "some commit", while the matcher excludes merges. The decision Rule and catalog already carried the qualification; these two did not. Comment-only. fixes #609 Decisions-Edit: yes Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -32,8 +32,9 @@ REQUIRED_META = ("key", "status", "since", "supersedes", "superseded_by", "signa
|
||||
# no token was needed — which silently disabled all three body-diff comparisons while the job still
|
||||
# reported green. Git recognises a trailer only in a message's final trailer block, so discussing the
|
||||
# marker mid-message — which is what actually happened — can no longer arm anything. It is NOT a total
|
||||
# immunity: a quoted example that IS the final paragraph of a commit message parses as a real trailer
|
||||
# and does arm. See `ci.decisions-edit-trailer` for that residual, stated rather than papered over.
|
||||
# immunity: a quoted example that IS the final paragraph of a NON-MERGE commit message parses as a
|
||||
# real trailer and does arm (merge commits are excluded — see `_edit_trailer_armed`). See
|
||||
# `ci.decisions-edit-trailer` for that residual, stated rather than papered over.
|
||||
EDIT_TRAILER = "Decisions-Edit"
|
||||
_EDIT_TRAILER_AFFIRMATIVE = frozenset({"yes", "true", "1"})
|
||||
_LEGACY_EDIT_TOKEN = "[decisions-edit]" # noqa: S105 (a commit-message marker, not a credential)
|
||||
@@ -264,7 +265,7 @@ def _rationale(rec) -> str:
|
||||
|
||||
|
||||
def _edit_trailer_armed(mb: str, head: str) -> bool:
|
||||
"""True when some commit in `mb..head` carries an affirmative `Decisions-Edit:` git trailer.
|
||||
"""True when some NON-MERGE commit in `mb..head` carries an affirmative `Decisions-Edit:` trailer.
|
||||
|
||||
A non-affirmative value (`no`, `not-needed`, …) deliberately does NOT arm the exemption: the
|
||||
marker must be an explicit yes, so a trailer written to *record that no edit was intended* can
|
||||
|
||||
Reference in New Issue
Block a user