Skip to content

feat: add Approve PR button to top bar via gh CLI#5

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/approve-pr-request
Closed

feat: add Approve PR button to top bar via gh CLI#5
Copilot wants to merge 2 commits intomainfrom
copilot/approve-pr-request

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 25, 2026

Adds a one-click "Approve PR" action to the top bar for non-default workspaces, complementing the existing "Open PR" button.

Changes

  • TopBarApprovePR.tsx (new) — Button component that:
    • Runs gh pr view --json number,state,url to validate an open PR exists on the current branch
    • Runs gh pr review --approve to submit the approval
    • Shows inline loading states (Checking… / Approving…) and toast feedback for all outcomes
    • Hidden on default workspaces (same guard as TopBarOpenPR)
  • TopBar.tsx — Renders <TopBarApprovePR> adjacent to <TopBarOpenPR>

Requires the gh CLI to be authenticated in the workspace environment.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Approve pull request for review feat: add Approve PR button to top bar via gh CLI Mar 25, 2026
Copilot AI requested a review from astyfx March 25, 2026 02:18
@astyfx astyfx closed this Mar 25, 2026
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.

2 participants