agent-orchestrator/backend/internal/ports/pr_observations.go

41 lines
1.1 KiB
Go

package ports
import "github.com/aoagents/agent-orchestrator/backend/internal/domain"
// PRObservation is what the SCM poller reports for one PR. Fetched is the
// failed-fetch guard: when false the rest is meaningless and lifecycle must not
// read it as "PR closed". Checks/Comments are observation DTOs, not persistence
// rows; the PR Manager owns mapping them into stored domain.PullRequest rows.
type PRObservation struct {
Fetched bool
URL string
Number int
Draft bool
Merged bool
Closed bool
CI domain.CIState
Review domain.ReviewDecision
Mergeability domain.Mergeability
Checks []PRCheckObservation
Comments []PRCommentObservation
}
// PRCheckObservation is one SCM check result on the observed PR.
type PRCheckObservation struct {
Name string
CommitHash string
Status domain.PRCheckStatus
URL string
LogTail string
}
// PRCommentObservation is one review comment observed on the PR.
type PRCommentObservation struct {
ID string
Author string
File string
Line int
Body string
Resolved bool
}