fix: credential check, step summary, fetch hardening, case-insensitive repo match

- drafter: claude with neither CLAUDE_CODE_OAUTH_TOKEN nor ANTHROPIC_API_KEY set posts
  the stage 1 flags with the note 'drafter: claude but no Claude credential is set' and
  fails, without starting Claude.
- total_cost_usd and num_turns are printed and appended to GITHUB_STEP_SUMMARY.
- git.fetch puts --end-of-options before the branch; run_pr and run_monthly use it.
- The bot's own PRs match head.repo.full_name case-insensitively.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jaredandClaude Opus 5.5 committed 2026-11-12 14:35:42 -05:00
1 parent ade847ba5b
commit a1f061ca6c
9 files changed
+112 -6

No files matched your search

+2 -2
View File
@@ -64,13 +64,13 @@ def post_issue(forge, flags: tuple[Flag, ...], month: str, note: str | None = No
def _checkout(base: str, month: str, reuse: dict | None, ident, cwd: Path) -> str | None:
"""The branch to draft on, or None when a reused branch no longer merges."""
git.run(["fetch", "-q", "origin", base], cwd)
git.fetch(base, cwd)
if reuse is None:
branch = f"{MONTHLY_PREFIX}{month}"
git.checkout_new(branch, f"origin/{base}", cwd)
return branch
branch = reuse["head"]["ref"]
git.run(["fetch", "-q", "origin", branch], cwd)
git.fetch(branch, cwd)
git.checkout_new(branch, "FETCH_HEAD", cwd)
try:
git.merge(f"origin/{base}", ident, cwd)