From 672cfaa53c72dd67fb54ecbdd904ea364d2951c4 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Tue, 2 Jun 2026 10:57:53 -0400 Subject: Made PR quality check require tickets for new contributors. Agents are already abusing the exception for small pull requests by mixing in unrelated typo fixes with their code changes for unreviewed tickets and removing mention of said ticket. --- scripts/pr_quality/tests/test_check_pr.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts/pr_quality/tests') diff --git a/scripts/pr_quality/tests/test_check_pr.py b/scripts/pr_quality/tests/test_check_pr.py index 30bfa26512..0aff15ca10 100644 --- a/scripts/pr_quality/tests/test_check_pr.py +++ b/scripts/pr_quality/tests/test_check_pr.py @@ -770,6 +770,15 @@ class TestIntegration(BaseTestCase): self.assertIsNone(result) mock_gh.assert_not_called() + def test_new_contributor_cannot_omit_ticket(self): + body = make_pr_body(ticket="", checked_items=0) + _, mock_summary, _ = self.call_main(pr_body=body, commit_count=0) + _, results, _ = mock_summary.call_args.args + result_map = {name: result for name, result, _ in results} + self.assertEqual( + result_map["Trac ticket referenced"].title, check_pr.MISSING_TRAC_TICKET[0] + ) + def test_fully_valid_pr_no_comment_posted(self): result, _, mock_gh = self.call_main( pr_body=VALID_PR_BODY, pr_title=VALID_PR_TITLE -- cgit v1.3