Skip to content
[ 03 ]Commands

copia-cli search prs

copia-cli search prs [<query>] [flags]

Search pull requests across every repository the token can read, with GET /repos/issues/search. By default all states are searched; results come newest first.

--author takes a login, "@me" is the authenticated user; the author is also checked on each result, since app.copia.io ignores the created_by filter. The search endpoint filters assignees only on the authenticated user, so --assignee takes "@me" or your own login. --owner limits the search to the repositories of a user or organization; -R owner/repo to one repository. Labels match any of the given names.

Use --web to open the search in the browser instead; no API call is made, so no token is needed. Copia has no web search across repositories, so --web opens the pull request dashboard (/pulls, or /org/<owner>/pulls with --owner, which needs membership of that organization) with the query, --state, --author and --assignee; the dashboard shows open pull requests unless --state closed is given. With -R it opens the pull request list of that repository, which applies --author and --assignee @me only. --label is not applied in the browser, since the web pages take labels only by ID.

Options

--assignee <string>
Filter by assignee (@me)
--author <string>
Filter by author
-q, --jq <expression>
Filter JSON output using a jq expression
--json <fields>
Output JSON with the specified fields: number, title, state, html_url, repository, user, labels, created_at, updated_at
-l, --label <strings>
Filter by label
-L, --limit <int>
Maximum number of results (default 30)
--owner <string>
Filter on repository owner
-s, --state <string>
Filter by state: {open|closed}
-t, --template <template>
Format JSON output using a Go template (helpers: join, pluck, truncate, timeago, tablerow, tablerender)
-w, --web
Open the search query in the web browser

Options inherited from parent commands

--host <string>
Target Copia host
-R, --repo <string>
Select repository (owner/repo)
--token <string>
Authentication token

Examples

$ copia-cli search prs timeout
$ copia-cli search prs --author @me --state open
$ copia-cli search prs sensor --owner my-org --label bug
$ copia-cli search prs fix -R my-org/plc --json number,title,state
$ copia-cli search prs --author @me --web

See also