Skip to content

Commit 67689d4

Browse files
moraescCopilotCopilotjc-clark
authored
[Do not merge before July 16] Add docs for archiving pull requests (#62277)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com> Copilot-Session: b4471baf-828f-4d31-8b1b-477ac89b700f
1 parent 827f4cb commit 67689d4

4 files changed

Lines changed: 59 additions & 1 deletion

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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.

content/communities/moderating-comments-and-conversations/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Moderating comments and conversations
33
shortTitle: Moderation
4-
intro: 'Moderating conversations creates a welcoming community for all contributors to your project by promoting healthy collaboration and de-escalating conflict. You can apply your community''s code of conduct to discussions by viewing reported content, editing and deleting comments, and locking conversations.'
4+
intro: Moderating conversations creates a welcoming community for all contributors to your project by promoting healthy collaboration and de-escalating conflict. You can apply your community's code of conduct to discussions by viewing reported content, editing and deleting comments, and locking conversations.
55
redirect_from:
66
- /articles/moderating-comments-and-conversations
77
- /github/building-a-strong-community/moderating-comments-and-conversations
@@ -12,6 +12,7 @@ versions:
1212
children:
1313
- /managing-disruptive-comments
1414
- /locking-conversations
15+
- /archive-pull-requests
1516
- /limiting-interactions-in-your-repository
1617
- /limiting-interactions-for-your-personal-account
1718
- /limiting-interactions-in-your-organization

content/search-github/searching-on-github/searching-issues-and-pull-requests.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ You can filter issues and pull requests based on whether they're open or closed
6868
| `is:open` | [**performance is:open is:issue**](https://github.com/search?q=performance+is%3Aopen+is%3Aissue&type=Issues) matches open issues with the word "performance."
6969
| `is:closed` | [**android is:closed**](https://github.com/search?utf8=%E2%9C%93&q=android+is%3Aclosed&type=) matches closed issues and pull requests with the word "android."
7070

71+
{% ifversion archive-pull-requests %}
72+
73+
## Search based on whether a pull request is archived
74+
75+
Repository administrators can archive a pull request to remove it from public view. You can search for archived pull requests using the `is:archived` qualifier. For more information, see [AUTOTITLE](/communities/moderating-comments-and-conversations/archive-pull-requests).
76+
77+
| Qualifier | Example
78+
| ------------- | -------------
79+
| `is:archived` | [**is:archived is:pr spam**](https://github.com/search?q=is%3Aarchived+is%3Apr+spam) matches archived pull requests that contain the word "spam" in repositories where you are a repository administrator.
80+
81+
{% endif %}
82+
7183
## Search for pull requests in the merge queue
7284

7385
You can also use the `is` qualifier to find pull requests that are queued to merge.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Reference: https://github.com/github/docs-content/issues/21075
2+
# Archiving pull requests moderation feature
3+
versions:
4+
fpt: '*'
5+
ghec: '*'
6+
ghes: '>=3.21'

0 commit comments

Comments
 (0)