Skip to content

fix: keep the full changelog link when a change entry has an unrelated compare url - #1481

Open
qiaobochi040726-source wants to merge 1 commit into
cubrid-lab:mainfrom
qiaobochi040726-source:20261129-release-footer-compare
Open

qiaobochi040726-source wants to merge 1 commit into
cubrid-lab:mainfrom
qiaobochi040726-source:20261129-release-footer-compare

Conversation

@qiaobochi040726-source

Copy link
Copy Markdown

Summary

scripts/extract_release_notes.py skipped the **Full Changelog** footer whenever the section body contained any GitHub compare URL, so a normal change entry linking to an upstream comparison silently dropped the canonical link for that release. The check now looks for this release's own compare URL instead, which keeps the old "don't duplicate a footer that is already there" behaviour.

Changes

  • scripts/extract_release_notes.py: compare the canonical URL from full_changelog_link() against the body instead of matching any compare URL; the unused COMPARE_LINK regex is gone and the docstring says which link counts.
  • test/test_extract_release_notes.py: new case with a foreign compare link in a change entry — the entry keeps its link and the footer is still appended once.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Checklist

  • I checked existing Assignees, claims and PRs; no other PR touches this script.
  • The linked issue has current scope, verifiable completion criteria and validation instructions.
  • I checked related open PRs and newer merged changes for overlapping scope: None.
  • My code follows the project's code style (ruff passes on both files)
  • I have linked required GitHub CI and reported recommended local checks actually run or omitted
  • I have added tests for new functionality (if applicable)
  • I have updated matching behavior/API/version/config documentation, or provided a populated standalone physical source line Docs: not needed - module docstring is the only documentation for this script and it is updated in this change
  • I have recorded known warnings, limitations and follow-up work

Validation

uv run --no-project --with pytest --with "sqlalchemy>=2.0" python -m pytest test/test_extract_release_notes.py -q -> 12 passed (11 before).

Release-adjacent files as well: test_extract_release_notes.py test_release_workflows.py test_lint_changelog_sections.py test_check_release_note_quality.py -> 148 passed.

Also ran the script by hand on a changelog whose 1.2.0 entry links to other/project/compare/v9...v10: the entry link stayed and the v1.1.0...v1.2.0 footer was appended.

Live CUBRID/Alembic evidence: not applicable, release-notes script only.

Related Issues

Closes #1480

Related PRs and precedence: None
Unresolved decision or dependency: None

@yeongseon yeongseon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue requires an actual canonical footer, not just the URL. Please coordinate with #1482 before doing more work on the same extractor.

notes += "\n" + link + "\n"
if link:
url = link.removeprefix("**Full Changelog**: ")
if url not in body:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A change entry containing this release's exact compare URL still suppresses the footer here. Please distinguish the standalone canonical footer line from a URL embedded in prose, and cover both cases in the CLI tests.

This branch has not been deployed

No deployments
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.

bug: distinguish the release footer from compare links inside change entries

2 participants