Skip to content

refactor(ps): move pr_status computation to daemon#397

Open
proboscis wants to merge 1 commit intomainfrom
issue/orch-387/run-20260201-104238
Open

refactor(ps): move pr_status computation to daemon#397
proboscis wants to merge 1 commit intomainfrom
issue/orch-387/run-20260201-104238

Conversation

@proboscis
Copy link
Owner

Summary

  • Add PRStatus enum and field to proto Run message
  • Daemon now computes pr_status from run data and branch state
  • CLI uses daemon-provided pr_status instead of computing locally
  • Remove prStatusFromRun() and branchStatusFromGitState() functions

Changes

Proto (api/orch.proto)

  • Added PRStatus enum: NONE, OPEN, MERGED, CLOSED
  • Added pr_status field (field 20) to Run message

Daemon

  • proto_handler.go: Added computePRStatus() function
  • proto_client.go: Added protoPRStatusToString() conversion
  • types.go: Added PRStatus field to RunSummary and RunFull

CLI (internal/cli/ps.go)

  • Removed prStatusFromRun() function
  • Removed branchStatusFromGitState() function
  • Uses daemon-provided PRStatus directly from orchapi.Run

Tests

  • Removed TestPrStatusFromRun and TestBranchStatusFromGitState tests
  • Updated remaining tests to provide mock prStatusByRun values

Testing

go test ./internal/...   # All pass
go build ./...           # Clean build

Closes: orch-387

- Add PRStatus enum and field to proto Run message
- Daemon computes pr_status from run data and branch state
- CLI uses daemon-provided pr_status instead of computing locally
- Remove prStatusFromRun() and branchStatusFromGitState() functions
- Update tests to provide mock prStatusByRun values

Closes: orch-387
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant