Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/codacy-cloud-cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,21 @@ This information is also included when using `--output json`.
!!! note
Not every advisory lists specific affected functions — this section only appears when Codacy has identified them.

### List and filter pull requests

```bash
# List open pull requests (default)
codacy pull-requests gh my-org my-repo

# Filter by title or author handle, and by base branch
codacy pull-requests gh my-org my-repo --search "fix flaky" --base main

# List closed pull requests instead
codacy pull-requests gh my-org my-repo --state closed
```

`pull-requests` (alias `prs`) mirrors the [Pull Requests page filters](../repositories/pull-requests.md#filtering): `--search`/`-q` matches the title or author handle, and `--base`/`-B` matches the pull request's base branch.
Comment thread
claudiacodacy marked this conversation as resolved.

### Inspect pull requests

```bash
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions docs/repositories/pull-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ By default, the page lists open pull requests, but you can click the **Closed**

![Pull Requests page](images/pull-requests.png)

## Filtering pull requests {: id="filtering"}

Above the **Open** and **Closed** tabs, use the search box and the branch switch to narrow down the pull request list:

- **Search**: type at least 3 characters to filter pull requests by title or author handle. The search applies to both the Open and Closed tabs.
- **Branch switch**: click **View all target branches** to choose between:
Comment thread
claudiacodacy marked this conversation as resolved.
- **Targeting any branch** (the default): shows every pull request, regardless of its base branch.
- **Targeting current branch**: shows only pull requests whose base branch matches the branch currently selected for the repository.
Comment thread
claudiacodacy marked this conversation as resolved.

The Open and Closed counts update to match the selected branch, but aren't affected by the search text.

![Filtering pull requests](images/pull-request-filters.png)

!!! tip
The [Codacy Cloud CLI](../codacy-cloud-cli/index.md) supports the same filters, for example `codacy pull-requests gh my-org my-repo --search "fix flaky" --base main`.

Click a specific pull request to see detailed information about the code quality changes introduced by that pull request.

!!! tip
Expand Down
Loading