fix: add _tea_get and merged-PR catch-up to close issues on merge (#305) #310

Merged
guettlibot merged 3 commits from issue-305-fix into main 2026-05-27 22:07:15 +00:00
3 Commits
Author SHA1 Message Date
Thomas SharedInboxandClaude Sonnet 4.6 4515f24268 fix: check issue state not labels in merged-PR catch-up
Closed issues can still have labels; the old `if not labels` guard
never fired for issue #272, so the loop retried the no-op close every
minute and never reached the ToPlan/Ready issue logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 05:45:53 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 5145d91597 fix: add _tea_get, merged-PR catch-up to close issues on merge (#305)
Why State/Question appeared on issue #282: the loop waited 15 min for a
CI run on branch issue-282-fix, found none (ci.yml path filter did not
trigger for workflow-file-only changes), and set State/Question.

Fixes two related issues:

1. Add `_tea_get()` — a direct Codeberg API client using urllib.  Refactor
   `_latest_main_ci_run` and `_latest_ci_run_for_branch` to use it (the
   latter now matches PR runs via `event_payload` instead of resolving the
   PR number first).  Also use it for the `mergeable` check in
   `_handle_pr_still_open_after_merge`.  This fixes 14 pre-existing test
   failures that mocked `agent_loop._tea_get` but the function didn't exist.

2. Add `_merged_issue_prs()` and a catch-up scan in `_run_loop()`: on each
   tick the loop now finds merged `issue-{N}-fix` PRs whose issues still
   carry state labels and closes them.  This handles the case where
   State/Question was set (e.g., CI path-filter miss) but the PR was later
   merged manually — the next cron tick will close the issue automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 00:06:21 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 de3b99a0d6 feat: add --dangerously-skip-permissions to all claude --resume output (#304)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 23:47:19 +02:00