From 1c52fb7cea63dee4a347f9d8bc07308997a113b4 Mon Sep 17 00:00:00 2001 From: Bryan Date: Fri, 28 Aug 2026 03:30:59 +0000 Subject: [PATCH] ci(bind): list ports commits in candidate PR --- .github/ci/ci-tests/test_bind920_candidate.py | 8 ++++++++ .github/workflows/bind920-candidate.yml | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/ci/ci-tests/test_bind920_candidate.py b/.github/ci/ci-tests/test_bind920_candidate.py index ba40976fe1..fbe60fc0ec 100644 --- a/.github/ci/ci-tests/test_bind920_candidate.py +++ b/.github/ci/ci-tests/test_bind920_candidate.py @@ -423,6 +423,14 @@ def test_candidate_workflow_never_publishes_packages(self) -> None: self.assertNotIn("release_channel.py publish", workflow) self.assertIn("Publication: not performed by this workflow", workflow) + def test_candidate_workflow_includes_ports_commit_subjects_in_pr_body(self) -> None: + """Review PRs must show the FreeBSD Ports commits behind the candidate.""" + workflow = self.workflow_text() + self.assertIn("### FreeBSD Ports Changes", workflow) + self.assertIn("while read -r commit subject; do", workflow) + self.assertIn("printf -- '- `%s` %s\\n' \"$commit\" \"$subject\"", workflow) + self.assertIn("No dns/bind920 commits found between the pinned and candidate Ports commits.", workflow) + def test_candidate_workflow_uses_pinned_actions(self) -> None: """Workflow actions must stay pinned to immutable SHAs.""" workflow = self.workflow_text() diff --git a/.github/workflows/bind920-candidate.yml b/.github/workflows/bind920-candidate.yml index 0404de8746..c9d2e34362 100644 --- a/.github/workflows/bind920-candidate.yml +++ b/.github/workflows/bind920-candidate.yml @@ -141,6 +141,16 @@ jobs: --output "$RUNNER_TEMP/assessment.md" { cat "$RUNNER_TEMP/assessment.md" + printf '\n### FreeBSD Ports Changes\n\n' + if [ -s "$PORTS_LOG" ]; then + while read -r commit subject; do + if [ -n "$commit" ]; then + printf -- '- `%s` %s\n' "$commit" "$subject" + fi + done < "$PORTS_LOG" + else + printf -- '- No dns/bind920 commits found between the pinned and candidate Ports commits.\n' + fi printf '\n### Candidate Inputs\n\n' printf -- '- FreeBSD Ports commit: `%s`\n' "$CANDIDATE_COMMIT" printf -- '- Previous FreeBSD Ports commit: `%s`\n' '${{ steps.ports.outputs.current_commit }}'