@senior: opscode events are not in the PR #5

Merged
ffaerber merged 1 commits from ai/issue-4 into main 2026-07-02 15:52:44 +02:00

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

## 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
gitea-actions bot added 1 commit 2026-07-02 15:51:36 +02:00
ffaerber merged commit d8c47849cd into main 2026-07-02 15:52:44 +02:00
ffaerber deleted branch ai/issue-4 2026-07-02 15:52:46 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gitea/agents#5