Skip to content

fix(DS-REL): date a re-added section from its last addition (v0.3.2) - #5

Merged
boeboe merged 1 commit into
mainfrom
fix/ds-rel-readded
Nov 14, 2026
Merged

boeboe merged 1 commit into
mainfrom
fix/ds-rel-readded

Conversation

@boeboe

@boeboe boeboe commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

DS-REL reports a newest ## vX.Y.Z section that is still untagged a day after it was committed. The date came from the oldest commit that ever changed the heading's count (git log -S, last line). For a heading that was added, folded into another section and later written again, that oldest commit is the first addition. go-iec61850's ## v1.21.0 was added in #67 and folded away in #72 on 2026-11-11, so the pull request that writes it again for the real v1.21.0 is reported as "release notes since 2026-11-11" before it is merged.

Added now takes the newest commit that changed the heading's count, and only when the file still holds the heading at that commit:

  • A heading written again dates from that commit.
  • A heading that is back in the work tree but not committed has no date, as a heading never committed has none. A local make check on an uncommitted section behaves as before.

Tests

  • TestAdded (internal/gitinfo) builds a nested-module history: added, folded, back uncommitted, added again, reworded. On v0.3.1 it fails at "back but not committed" (it returned the first addition).
  • TestGitChecks is unchanged and passes.
  • make check passes, coverage 89.4%.
  • The fixed build reports nothing on go-iec61850's feat/policy-1.6-minor tree (library, sclparse, sclgen), where v0.3.1 reports the finding.

Patch release v0.3.2. Consumers move when they bump docsync-version.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@boeboe
boeboe merged commit 6d5d0c0 into main Nov 14, 2026
13 checks passed
@boeboe
boeboe deleted the fix/ds-rel-readded branch November 14, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant