This ticket covers two improvements to the pullRequestService:
Filter by State: The listPullRequests function has been enhanced to allow filtering pull requests by their state (open, closed, merged, all). This is exposed via a state query parameter in the GET /pull-requests endpoint.
Improved Checkout Response: The checkoutPullRequest function was updated to include the stdout from the gh pr checkout command in its response. This provides more useful feedback to the caller (e.g., the name of the branch that was checked out).
Acceptance Criteria
- The
openapi.yaml is updated to include the optional state query parameter for the GET /pull-requests endpoint.
pullRequestService.mjs is updated:
listPullRequests now accepts a state option and passes it to the gh pr list --state command.
checkoutPullRequest now returns an object containing the details from the command's stdout.
- The
pullRequests.mjs route is updated to read the state from the query string and pass it to the service.
This ticket covers two improvements to the
pullRequestService:Filter by State: The
listPullRequestsfunction has been enhanced to allow filtering pull requests by their state (open,closed,merged,all). This is exposed via astatequery parameter in theGET /pull-requestsendpoint.Improved Checkout Response: The
checkoutPullRequestfunction was updated to include thestdoutfrom thegh pr checkoutcommand in its response. This provides more useful feedback to the caller (e.g., the name of the branch that was checked out).Acceptance Criteria
openapi.yamlis updated to include the optionalstatequery parameter for theGET /pull-requestsendpoint.pullRequestService.mjsis updated:listPullRequestsnow accepts astateoption and passes it to thegh pr list --statecommand.checkoutPullRequestnow returns an object containing thedetailsfrom the command'sstdout.pullRequests.mjsroute is updated to read thestatefrom the query string and pass it to the service.