The opscode activity log (and "PR ready" note) added in #2 were stranded on the triggering issue instead of the PR thread, because $NUM is fixed to the original issue number and the loop opened a PR per ai/issue-N* branch. Now a run publishes at most one PR (its own $BRANCH) and captures the real PR number so the activity log and "ready for review" comments land on the PR thread, not the issue.
Changes
.gitea/workflows/agent.yml Publish step: replaced the multi-branch mapfile/for-loop with single-branch publish of $BRANCH only (one PR per run).
Capture the actual PR .number from both the open-PR lookup and the create-PR response (was only taking .html_url).
Add prpost() helper that posts to $API/issues/<prnum>/comments when a PR exists, falling back to $NUM otherwise; route the "PR ready for review" / "updated branch/PR" message and the activity-log comment through it.
Drop the now-dead multi-PR ("merge sequentially") wording in the new-PR message.
No changes to the comment-mode (pm/qa) path, the BEGIN_SUBTASKS path, or the no-changes plan/questions path.
## Summary
The opscode activity log (and "PR ready" note) added in #2 were stranded on the triggering issue instead of the PR thread, because `$NUM` is fixed to the original issue number and the loop opened a PR per `ai/issue-N*` branch. Now a run publishes at most one PR (its own `$BRANCH`) and captures the real PR number so the activity log and "ready for review" comments land on the PR thread, not the issue.
## Changes
- `.gitea/workflows/agent.yml` Publish step: replaced the multi-branch `mapfile`/for-loop with single-branch publish of `$BRANCH` only (one PR per run).
- Capture the actual PR `.number` from both the open-PR lookup and the create-PR response (was only taking `.html_url`).
- Add `prpost()` helper that posts to `$API/issues/<prnum>/comments` when a PR exists, falling back to `$NUM` otherwise; route the "PR ready for review" / "updated branch/PR" message and the activity-log comment through it.
- Drop the now-dead multi-PR ("merge sequentially") wording in the new-PR message.
- No changes to the comment-mode (pm/qa) path, the `BEGIN_SUBTASKS` path, or the no-changes plan/questions path.
---
Resolves #4 · 🤖 @senior
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
The opscode activity log (and "PR ready" note) added in #2 were stranded on the triggering issue instead of the PR thread, because
$NUMis fixed to the original issue number and the loop opened a PR perai/issue-N*branch. Now a run publishes at most one PR (its own$BRANCH) and captures the real PR number so the activity log and "ready for review" comments land on the PR thread, not the issue.Changes
.gitea/workflows/agent.ymlPublish step: replaced the multi-branchmapfile/for-loop with single-branch publish of$BRANCHonly (one PR per run)..numberfrom both the open-PR lookup and the create-PR response (was only taking.html_url).prpost()helper that posts to$API/issues/<prnum>/commentswhen a PR exists, falling back to$NUMotherwise; route the "PR ready for review" / "updated branch/PR" message and the activity-log comment through it.BEGIN_SUBTASKSpath, or the no-changes plan/questions path.Resolves #4 · 🤖 @senior