|
| 1 | +--- |
| 2 | +title: Archive pull requests |
| 3 | +intro: Repository administrators can archive a pull request to remove it from public view, providing a moderation option between leaving a pull request up and permanently deleting it. |
| 4 | +versions: |
| 5 | + feature: archive-pull-requests |
| 6 | +category: |
| 7 | + - Moderate comments and conversations |
| 8 | +redirect_from: |
| 9 | + - /communities/moderating-comments-and-conversations/archiving-pull-requests |
| 10 | +contentType: other |
| 11 | +permissions: Repository administrators |
| 12 | +--- |
| 13 | + |
| 14 | +## About archiving pull requests |
| 15 | + |
| 16 | +Archiving a pull request removes it from public view while preserving its history for repository administrators. This provides a safer moderation path when they need to take a pull request out of public view without permanently deleting it. |
| 17 | + |
| 18 | +When a pull request is archived: |
| 19 | + |
| 20 | +* The pull request is only visible to repository administrators. Visitors without administrator access to the repository receive a 404 error. |
| 21 | +* The pull request is automatically closed and locked. |
| 22 | + |
| 23 | +When you unarchive a pull request, it becomes visible again, but it remains closed and locked. You can reopen and unlock it separately if needed. |
| 24 | + |
| 25 | +## Archiving a pull request |
| 26 | + |
| 27 | +{% data reusables.repositories.navigate-to-repo %} |
| 28 | +{% data reusables.repositories.sidebar-pr %} |
| 29 | +1. Click the pull request you want to archive. |
| 30 | +1. Scroll to the bottom of the right sidebar. Then click **{% octicon "archive" aria-hidden="true" aria-label="archive" %} Archive pull request**. |
| 31 | +1. Read the information about archiving the pull request, then confirm that you want to archive it. |
| 32 | + |
| 33 | +## Unarchiving a pull request |
| 34 | + |
| 35 | +You can find the PR by using the `is:archived` qualifier. See, [AUTOTITLE](/search-github/searching-on-github/searching-issues-and-pull-requests#search-based-on-whether-a-pull-request-is-archived). |
| 36 | + |
| 37 | +1. Open the pull request you want to unarchive. |
| 38 | +1. In the right sidebar, click **{% octicon "archive" aria-hidden="true" aria-label="unarchive" %} Unarchive pull request**. |
| 39 | +1. Read the information about unarchiving the pull request, then confirm that you want to unarchive it. |
0 commit comments