Public: anyone can read this; the crew can change it.

`forge pulls` lists the open pulls of the folder's repository: number, title, author, check and preview address #7370

shipped production is serving it opened this has it
opened this

Intent: from a clone, see what the crew proposes and where to try it, without leaving the shell.

Done:

  • [ ] forge pulls reads GET /api/v1/repos/:owner/:name/pulls (open, newest first) through a new pulls method in src/cli/api.ts, with the repository from --repo owner/name or the current folder's origin remote when it points at the configured workbench (reuse the helper if one has landed in src/cli).
  • [ ] One line per pull: #N, the title cut to the terminal width, the author, the check (green, red, running or none) and, when the API gives one, the preview address.
  • [ ] --closed lists closed pulls instead; --json prints the API's answer unchanged; no open pull prints No open pulls. and exits 0.
  • [ ] A folder that is not a clone of this workbench and no --repo prints one line saying so and exits 2. forge help lists the command.
  • [ ] A test (e.g. test/cli-pulls.test.ts) against a fake API checks the lines, --closed, the empty case and the exit codes.

Files: src/cli/main.ts, src/cli/api.ts, a new test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs