Automation: new commits on a branch reopen issue and set state::needsWork
## Summary When new commits are pushed to an issue branch, reopen the issue (if closed) and set its state back to `state::needsWork`. ## Work Track Cross-track (AI Core / coordination) ## Context / Background When someone pushes new code to an existing issue branch, the issue should re-enter the work loop: reopen if it was closed, and roll its state back to `needsWork` so it shows up in the queue again instead of pretending the previous review is still valid. Parent / related: #3586474. This issue is blocked by the three exploration issues (#3586475, #3586476, #3586477) — the platform choice and the available `gitlab_api` primitives must land first. ## Tasks * [ ] Subscribe to GitLab `Push Hook` events on issue-fork repos belonging to AI Initiative projects. * [ ] Map the pushed branch back to the upstream issue (branch name pattern `<issue-id>-<slug>`). * [ ] If the upstream issue is closed, reopen it. * [ ] Set state to `state::needsWork` (replacing any other state:: label). * [ ] Skip if the push was made by the automation bot itself, to avoid loops. * [ ] Optional: post a brief "new commits pushed by @user, returning to needsWork" comment. ## Acceptance Criteria * [ ] Pushing a new commit to an existing issue branch returns the issue to `state::needsWork`. * [ ] Closed-and-fixed issues are reopened on a new push. * [ ] No infinite loops with the bot's own pushes. ## Related issues ## AI Usage - [x] AI Assisted Issue — This issue was generated with AI assistance, but was reviewed and refined by the creator.
issue