1
0
mirror of synced 2025-12-23 21:07:12 -05:00

Document PR file tree view

This commit is contained in:
Sarah Edwards
2022-03-03 05:43:47 -08:00
committed by GitHub
parent b6e4ed31b4
commit 89f45939b6
4 changed files with 32 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
---
title: Filtering files in a pull request
intro: 'To help you quickly review changes in a large pull request, you can filter changed files.'
intro: 'To help you quickly review changes in a large pull request, you can filter changed files{% if pr-tree-view %} or use the file tree to navigate between files{% endif %}.'
redirect_from:
- /github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request
- /articles/filtering-files-in-a-pull-request-by-file-type
@@ -16,7 +16,9 @@ topics:
- Pull requests
shortTitle: Filter files
---
You can filter files in a pull request by file extension type, such as `.html` or `.js`, lack of an extension, code ownership, or dotfiles.
You can filter files in a pull request by file extension type, such as `.html` or `.js`, lack of an extension, code ownership, or dotfiles.{% if pr-tree-view %} You can also use the file tree to filter by file path, navigate between files, or see a high level view of the changed files.{% endif %}
## Using the file filter dropdown
{% tip %}
@@ -32,6 +34,26 @@ You can filter files in a pull request by file extension type, such as `.html` o
5. Optionally, to clear the filter selection, under the **Files changed** tab, click **Clear**.
![Clear file filter selection](/assets/images/help/pull_requests/clear-file-filter.png)
{% if pr-tree-view %}
## Using the file tree
{% data reusables.repositories.sidebar-pr %}
1. In the list of pull requests, click the pull request you'd like to filter.
{% data reusables.repositories.changed-files %}
1. If the file tree is hidden, click **Show file tree** to display the file tree.
{% note %}
**Note**: The file tree will not display if your screen width is too narrow or if the pull request only includes one file.
{% endnote %}
1. Click on a file in the file tree to view the corresponding file diff.
![Pull request file tree](/assets/images/help/pull_requests/pr-file-tree.png)
1. To filter by file path, enter part or all of the file path in the **Filter changed files** search box. Alternatively, use the file filter dropdown. For more information, see "[Using the file filter dropdown](#using-the-file-filter-dropdown)."
{% endif %}
## Further reading
- "[About comparing branches in a pull request](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-comparing-branches-in-pull-requests)"

View File

@@ -36,6 +36,7 @@ You can review changes in a pull request one file at a time. While reviewing the
You can also choose to hide whitespace differences. The choice you make only applies to this pull request and will be remembered the next time you visit this page.
{% endif %}
1. Optionally, filter the files to show only the files you want to review{% if pr-tree-view %} or use the file tree to navigate to a specific file{% endif %}. For more information, see "[Filtering files in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request)."
{% data reusables.repositories.start-line-comment %}
{% data reusables.repositories.type-line-comment %}
{% data reusables.repositories.suggest-changes %}