Follow Forgejo PR and issue lifecycle in mapped sessions #75
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!75
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-72-pr-lifecycle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes: #72
Implements the plan in #72:
webhook.ts):pull_request/pull_request_syncactionssynchronized,closed,reopenedandissuesactionsclosed,reopenedare queued. Agent pushes are ignored as self-authored; agent close/reopen are not.session-archive.ts):archiveSession(set archived, broadcastsessions_changed, dispose the live handle, remove the clone) is used byPOST /sessions/:id/archiveand the dispatcher.archived: merged/archived: closed without merge). Issue closed → archive, unless it is an implementer session with a PR. Reopen → unarchive. Before archiving, a running turn is given until the session kind's turn timeout to finish.synchronizedonly continues a mapped session (dropped otherwise, no permission check). The clone is refreshed first (refreshPullCheckout: detached reviewer clones move to the new PR head if clean; implementer clones onlyfetch --prune), then the turn gets the new commits viabuildPullSyncSeed.docs/configuration.mdupdated.Verification
bun run typecheckpasses, and the full server suite passes (887 tests) after rebasing onto main.refreshPullCheckout(detached clean/dirty, branch mode).Notes
pull_request_syncwith actionsynchronized, andpull_request.mergedon closed payloads. They come from Forgejo'smodules/webhook/type.go/ API structs as I remember them. If a merge doesn't showmerged, the session is still archived, but the row reason says "closed without merge".sessions_changedbroadcast to the archive route while this branch was open. That broadcast now lives in the shared helper, and the webhook reopen path also broadcasts it.