summaryrefslogtreecommitdiff
path: root/scripts/pr_quality/tests
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2026-06-02 10:57:53 -0400
committerJacob Walls <jacobtylerwalls@gmail.com>2026-06-02 11:43:31 -0400
commit672cfaa53c72dd67fb54ecbdd904ea364d2951c4 (patch)
treedc62957182f8b12c8d54bfee3ee34fd73ebe9924 /scripts/pr_quality/tests
parent48e0a64e6491b464249086d6052a00c8d2be418e (diff)
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.
Diffstat (limited to 'scripts/pr_quality/tests')
-rw-r--r--scripts/pr_quality/tests/test_check_pr.py9
1 files changed, 9 insertions, 0 deletions
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