Skip to content

fix(pr-management): verify the review footer when no contributing URL is set - #2026

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/footer-verify-without-contributing-url
Nov 9, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/footer-verify-without-contributing-url

Conversation

@potiuk

@potiuk potiuk commented Nov 9, 2026

Copy link
Copy Markdown
Member

Summary

  • code-review render reports footer_verified: false, and verify_footer returns action: block, for every review on a project with no upstream_contributing_docs_url.
  • footer() drops the last three template lines when there is no URL, but _footer_regex() always matched the full template, so the footer render itself had just written could never verify.
  • Both now share one helper for that trim, and verify_footer accepts either form of the footer.

A hand-edited body that loses the contributing link on a project that does have a URL now also verifies. render builds the footer itself, so this only affects manual edits. Tying the check to the configured URL would also need a change to the standalone verify command, so it is left out here.

Type of change

  • Python package (tools/*/ with pyproject.toml)

Test plan

  • prek run --all-files passes (not run: see below)
  • For Python packages touched: uv run pytest / ruff check / mypy passes
  • Other: prek run --files on the three changed files passes, including check-family-plugins. --all-files was not run because the checkout was sparse: the sandbox denies writes to .apache-magpie-overrides/tools/vetted-ops/.
  • Other: the four new test_footer_without_contributing_url_still_verifies cases fail on main and pass with this change. test_footer_without_contributing_url_truncated_is_blocked guards against the check becoming too loose.

RFC-AI-0004 compliance

No principles affected: this corrects a check and adds no new mutation, host access or outbound message.

Linked issues

None.

🤖 Generated with Claude Code

… is set

footer() drops the last three template lines when no contributing-docs
URL is configured, but _footer_regex() always matched the full template,
so verify_footer reported the footer render had just written as missing.
Share the trim between the two and accept either form.

Generated-by: Claude Opus 5
@potiuk potiuk added family:pr-management pr-management-* skills capability:fix Implement code change to resolve an issue labels Nov 9, 2026
@github-actions github-actions Bot added family:tools tools/* substrate:analytics Tool substrate: read-only metrics / dashboards / renderers labels Nov 9, 2026
@potiuk
potiuk enabled auto-merge (squash) November 9, 2026 02:02
@potiuk
potiuk merged commit b1c3dc2 into apache:main Nov 9, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:fix Implement code change to resolve an issue family:pr-management pr-management-* skills family:tools tools/* substrate:analytics Tool substrate: read-only metrics / dashboards / renderers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant