Skip to content

[pull] main from bytebase:main#162

Merged
pull[bot] merged 2 commits intoSuperoldman96:mainfrom
bytebase:main
Oct 5, 2025
Merged

[pull] main from bytebase:main#162
pull[bot] merged 2 commits intoSuperoldman96:mainfrom
bytebase:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Oct 5, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

d-bytebase and others added 2 commits October 5, 2025 07:15
Replace frontend's manual approval status computation with backend's
Issue_ApprovalStatus field. This eliminates duplicated logic and
establishes a single source of truth for approval state.

Changes:
- Update ReviewContext to use Issue_ApprovalStatus instead of Issue_Approver_Status
- Remove convertApprovalStatusToApproverStatus helper functions
- Simplify extractReviewContext and provideIssueReviewContext to return
  issue.approvalStatus directly
- Update all callers to use Issue_ApprovalStatus constants
- Include SKIPPED status in "done" check (approval not required)
- Remove unused _reviewStatus parameter from getApplicableIssueStatusActionList

Impact:
- Reduces code by ~65 lines across 8 files
- Eliminates complex approval status computation logic
- All approval decisions now rely on backend's computeApprovalStatus()

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
…17647)

Backend changes:
- Simplify computeApprovalStatus to only return status (not error message)
- Use nil-safe Get methods for all approval field access
- Remove unnecessary nil checks by relying on protobuf Get methods
- Cache approval object to avoid repeated GetApproval() calls
- Short-circuit REJECTED status check for better performance
- Remove redundant struct field initializations
- Ensure backend never returns APPROVAL_STATUS_UNSPECIFIED

Frontend changes:
- Simplify ReviewContext to only include flow field
- Remove unnecessary extractReviewContext calls
- Rename approval status variables for clarity:
  - done/isApproved/approvalDone → rolloutReady
  - ready → approvalFlowReady
- Compute approval status locally instead of from context
- Remove APPROVAL_STATUS_UNSPECIFIED checks (backend never returns it)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
@pull pull bot locked and limited conversation to collaborators Oct 5, 2025
@pull pull bot added the ⤵️ pull label Oct 5, 2025
@pull pull bot merged commit ac34cc2 into Superoldman96:main Oct 5, 2025
8 of 11 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant