Open, mark ready and merge a chunk's pull request with chunk-pr, which picks tea or gh from the remote #448

Merged
lilleman merged 8 commits from item-280 into main 2026-11-09 02:18:05 +01:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit 797c5dd4fc - Show all commits
+2 -2
View File
@@ -45,7 +45,7 @@ RULES: dict[RuleName, Rule] = {
),
"no-ai-attribution": Rule(
"no commit, PR, issue comment or file carries a Claude or Anthropic attribution, such as a co-author trailer or a generated-with line",
"a git, gh or tea command, and any file written",
"a git, gh, tea or chunk-pr command, and any file written",
),
# A Read carries no text for a marker, and a misjudged read has a way through that the message names, so no marker waives it.
"repeat-read": Rule(
@@ -140,7 +140,7 @@ def check(breaches: list[Breach], written: str, markdown: bool, bash: bool) -> C
def command_breaches(command: str, simples: list[Simple], home: str) -> list[Breach]:
breaches = []
found = commits(simples, home)
publishing = [simple for simple in simples if simple.words[0] in ("gh", "git", "tea")]
publishing = [simple for simple in simples if posixpath.basename(simple.words[0]) in ("chunk-pr", "gh", "git", "tea")]
if publishing and ATTRIBUTION.search(command):
breaches.append(Breach("no-ai-attribution", "the command carries an attribution", publishing[0].directory))
for simple in simples:
+2 -1
View File
@@ -133,8 +133,9 @@ class CommandBreaches(unittest.TestCase):
with self.subTest(command):
self.assertEqual(checked(command), [])
def test_an_attribution_breaks_only_in_a_git_gh_or_tea_command(self):
def test_an_attribution_breaks_only_in_a_git_gh_tea_or_chunk_pr_command(self):
self.assertEqual(checked(f"tea pr create --description '{TRAILER}'"), ["no-ai-attribution"])
self.assertEqual(checked(f"~/.claude/bin/chunk-pr open 'Do it' '{TRAILER}'"), ["no-ai-attribution"])
self.assertEqual(checked(f"grep -rn '{TRAILER}' ."), [])
def test_a_commit_breach_names_the_commit_s_checkout(self):