Skip to content

Commit 8504d0e

Browse files
authored
Merge branch 'main' into 2percentsilk/download-usage-report
2 parents fc790f5 + f8cfc21 commit 8504d0e

File tree

14 files changed

+34
-25
lines changed

14 files changed

+34
-25
lines changed

content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ The repository owner has full control of the repository. In addition to the acti
3737
| Limit interactions with the repository | "[Limiting interactions in your repository](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository)" |{% endif %}{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
3838
| Rename a branch, including the default branch | "[Renaming a branch](/github/administering-a-repository/renaming-a-branch)" |{% endif %}
3939
| Merge a pull request on a protected branch, even if there are no approving reviews | "[About protected branches](/github/administering-a-repository/about-protected-branches)" |
40-
| Delete the repository | "[Deleting a repository](/github/administering-a-repository/deleting-a-repository)" |
40+
| Delete the repository | "[Deleting a repository](/repositories/creating-and-managing-repositories/deleting-a-repository)" |
4141
| Manage the repository's topics | "[Classifying your repository with topics](/github/administering-a-repository/classifying-your-repository-with-topics)" |{% ifversion fpt or ghec %}
4242
| Manage security and analysis settings for the repository | "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)" |{% endif %}{% ifversion fpt or ghec %}
43-
| Enable the dependency graph for a private repository | "[Exploring the dependencies of a repository](/github/visualizing-repository-data-with-graphs/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)" |{% endif %}{% ifversion fpt or ghes > 3.0 or ghec %}
44-
| Delete and restore packages | "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)" |{% endif %}{% ifversion ghes = 3.0 or ghae %}
43+
| Enable the dependency graph for a private repository | "[Exploring the dependencies of a repository](/github/visualizing-repository-data-with-graphs/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)" |{% endif %}{% ifversion fpt or ghes > 3.1 or ghec or ghae %}
44+
| Delete and restore packages | "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)" |{% endif %}{% ifversion ghes < 3.1 %}
4545
| Delete packages | "[Deleting packages](/packages/learn-github-packages/deleting-a-package)" |{% endif %}
4646
| Customize the repository's social media preview | "[Customizing your repository's social media preview](/github/administering-a-repository/customizing-your-repositorys-social-media-preview)" |
4747
| Create a template from the repository | "[Creating a template repository](/github/creating-cloning-and-archiving-repositories/creating-a-template-repository)" |{% ifversion fpt or ghes or ghae-issue-4864 or ghec %}

content/developers/apps/building-oauth-apps/scopes-for-oauth-apps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Name | Description
7070
&emsp;`read:discussion` | Allows read access for team discussions.{% ifversion fpt or ghae or ghec %}
7171
**`write:packages`** | Grants access to upload or publish a package in {% data variables.product.prodname_registry %}. For more information, see "[Publishing a package](/github/managing-packages-with-github-packages/publishing-a-package)".
7272
**`read:packages`** | Grants access to download or install packages from {% data variables.product.prodname_registry %}. For more information, see "[Installing a package](/github/managing-packages-with-github-packages/installing-a-package)".
73-
**`delete:packages`** | Grants access to delete packages from {% data variables.product.prodname_registry %}. For more information, see "{% ifversion fpt or ghes > 3.0 or ghec %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 or ghae %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}."{% endif %}
73+
**`delete:packages`** | Grants access to delete packages from {% data variables.product.prodname_registry %}. For more information, see "{% ifversion fpt or ghes > 3.0 or ghec or ghae %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}."{% endif %}
7474
**`admin:gpg_key`** | Fully manage GPG keys.
7575
&emsp;`write:gpg_key`| Create, list, and view details for GPG keys.
7676
&emsp;`read:gpg_key`| List and view details for GPG keys.{% ifversion fpt or ghec %}

content/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Some of the features listed below are limited to organizations using {% data var
103103
| Edit a repository's description | | | | **X** | **X** |{% ifversion fpt or ghae or ghec %}
104104
| [View and install packages](/packages/publishing-and-managing-packages) | **X** | **X** | **X** | **X** | **X** |
105105
| [Publish packages](/packages/publishing-and-managing-packages/publishing-a-package) | | | **X** | **X** | **X** |
106-
| {% ifversion fpt or ghes > 3.0 or ghec %}[Delete and restore packages](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 or ghae %}[Delete packages](/packages/learn-github-packages/deleting-a-package){% endif %} | | | | | **X** | {% endif %}
106+
| {% ifversion fpt or ghes > 3.0 or ghec or ghae %}[Delete and restore packages](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 %}[Delete packages](/packages/learn-github-packages/deleting-a-package){% endif %} | | | | | **X** | {% endif %}
107107
| Manage [topics](/articles/classifying-your-repository-with-topics) | | | | **X** | **X** |
108108
| Enable wikis and restrict wiki editors | | | | **X** | **X** |
109109
| Enable project boards | | | | **X** | **X** |

content/packages/learn-github-packages/about-permissions-for-github-packages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ To use or manage a package hosted by a package registry, you must use a token wi
4747

4848
For example:
4949
- To download and install packages from a repository, your token must have the `read:packages` scope, and your user account must have read permission.
50-
- {% ifversion fpt or ghes > 3.0 or ghec %}To delete a package on {% data variables.product.product_name %}, your token must at least have the `delete:packages` and `read:packages` scope. The `repo` scope is also required for repo-scoped packages.{% elsif ghes < 3.1 %}To delete a specified version of a private package on {% data variables.product.product_name %}, your token must have the `delete:packages` and `repo` scope. Public packages cannot be deleted.{% elsif ghae %}To delete a specified version of a package on {% data variables.product.product_name %}, your token must have the `delete:packages` and `repo` scope.{% endif %} For more information, see "{% ifversion fpt or ghes > 3.0 or ghec %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 or ghae %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}."
50+
- {% ifversion fpt or ghes > 3.0 or ghec %}To delete a package on {% data variables.product.product_name %}, your token must at least have the `delete:packages` and `read:packages` scope. The `repo` scope is also required for repo-scoped packages.{% elsif ghes < 3.1 %}To delete a specified version of a private package on {% data variables.product.product_name %}, your token must have the `delete:packages` and `repo` scope. Public packages cannot be deleted.{% elsif ghae %}To delete a specified version of a package on {% data variables.product.product_name %}, your token must have the `delete:packages` and `repo` scope.{% endif %} For more information, see "{% ifversion fpt or ghes > 3.0 or ghec or ghae %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}."
5151

5252
| Scope | Description | Required permission |
5353
| --- | --- | --- |

content/packages/learn-github-packages/deleting-a-package.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ intro: 'You can delete a version of a {% ifversion not ghae %}private{% endif %}
44
product: '{% data reusables.gated-features.packages %}'
55
versions:
66
ghes: '>=2.22 <3.1'
7-
ghae: '*'
87
---
98

109
{% data reusables.package_registry.packages-ghes-release-stage %}
@@ -31,7 +30,7 @@ To delete a {% ifversion not ghae %}private {% endif %}package version, you must
3130

3231
## Deleting a version of a {% ifversion not ghae %}private {% endif %}package with GraphQL
3332

34-
Use the `deletePackageVersion` mutation in the GraphQL API. You must use a token with the `read:packages`, `delete:packages`, and `repo` scopes. For more information about tokens, see "[About {% data variables.product.prodname_registry %}](/packages/publishing-and-managing-packages/about-github-packages#authenticating-to-github-packages)."
33+
Use the `deletePackageVersion` mutation in the GraphQL API. You must use a token with the `read:packages`, `delete:packages`, and `repo` scopes. For more information about tokens, see "[About {% data variables.product.prodname_registry %}](/packages/publishing-and-managing-packages/about-github-packages#authenticating-to-github-packages)."
3534

3635
Here is an example cURL command to delete a package version with the package version ID of `MDIyOlJlZ2lzdHJ5UGFja2FnZVZlcnNpb243MTExNg`, using a personal access token.
3736

content/packages/learn-github-packages/deleting-and-restoring-a-package.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ versions:
1111
fpt: '*'
1212
ghes: '>=3.1'
1313
ghec: '*'
14+
ghae: '*'
1415
shortTitle: Delete & restore a package
1516
---
1617

@@ -36,6 +37,7 @@ On {% data variables.product.prodname_dotcom %}, you can also restore an entire
3637
- You restore the package within 30 days of its deletion.
3738
- The same package namespace is still available and not used for a new package.
3839

40+
{% ifversion fpt or ghec or ghes %}
3941
## Packages API support
4042

4143
{% ifversion fpt or ghec %}
@@ -44,7 +46,7 @@ You can use the REST API to manage your packages. For more information, see the
4446

4547
{% endif %}
4648

47-
For packages that inherit their permissions and access from repositories, you can use GraphQL to delete a specific package version.{% ifversion fpt or ghec %} The {% data variables.product.prodname_registry %} GraphQL API does not support containers or Docker images that use the package namespace `https://ghcr.io/OWNER/PACKAGE-NAME`. For more information about GraphQL support, see "[Deleting a version of a repository-scoped package with GraphQL](#deleting-a-version-of-a-repository-scoped-package-with-graphql)."
49+
For packages that inherit their permissions and access from repositories, you can use GraphQL to delete a specific package version.{% ifversion fpt or ghec %} The {% data variables.product.prodname_registry %} GraphQL API does not support containers or Docker images that use the package namespace `https://ghcr.io/OWNER/PACKAGE-NAME`.{% endif %} For more information about GraphQL support, see "[Deleting a version of a repository-scoped package with GraphQL](#deleting-a-version-of-a-repository-scoped-package-with-graphql)."
4850

4951
{% endif %}
5052

@@ -63,7 +65,7 @@ Repository-scoped packages on {% data variables.product.prodname_registry %} inc
6365
{% ifversion fpt or ghec %}
6466

6567
To delete a package that has granular permissions separate from a repository, such as container images stored at `https://ghcr.io/OWNER/PACKAGE-NAME`, you must have admin access to the package.
66-
<!--PLACEHOLDER - once packages restructuring is done this is a good place to link to the access control and visibility article.-->
68+
For more information, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages)."
6769

6870
{% endif %}
6971

@@ -82,14 +84,14 @@ To delete a version of a repository-scoped package, you must have admin permissi
8284
6. To confirm deletion, type the package name and click **I understand the consequences, delete this version**.
8385
![Confirm package deletion button](/assets/images/help/package-registry/package-version-deletion-confirmation.png)
8486

87+
{% ifversion fpt or ghec or ghes %}
8588
### Deleting a version of a repository-scoped package with GraphQL
8689

8790
For packages that inherit their permissions and access from repositories, you can use the GraphQL to delete a specific package version.
8891

8992
{% ifversion fpt or ghec %}
90-
GraphQL is not supported for containers or Docker images at `ghcr.io`.
93+
For containers or Docker images at `ghcr.io`, GraphQL is not supported but you can use the REST API. For more information, see the "[{% data variables.product.prodname_registry %} API](/rest/reference/packages)."
9194
{% endif %}
92-
<!--PLACEHOLDER for when API link is live: For full support, use the REST API. For more information, see the "[{% data variables.product.prodname_registry %} API](/rest/reference/packages)." -->
9395

9496
Use the `deletePackageVersion` mutation in the GraphQL API. You must use a token with the `read:packages`, `delete:packages`, and `repo` scopes. For more information about tokens, see "[About {% data variables.product.prodname_registry %}](/packages/publishing-and-managing-packages/about-github-packages#authenticating-to-github-packages)."
9597

@@ -109,6 +111,8 @@ For more information about the `deletePackageVersion` mutation, see "[`deletePac
109111

110112
You cannot directly delete an entire package using GraphQL, but if you delete every version of a package, the package will no longer show on {% data variables.product.product_name %}.
111113

114+
{% endif %}
115+
112116
{% ifversion fpt or ghec %}
113117
### Deleting a version of a user-scoped package on {% data variables.product.prodname_dotcom %}
114118

@@ -124,12 +128,12 @@ To review who can delete a package version, see "[Required permissions](#require
124128
6. To confirm deletion, type the package name and click **I understand the consequences, delete this version**.
125129
![Confirm package deletion button](/assets/images/help/package-registry/confirm-container-package-version-deletion.png)
126130

127-
### Deleting a version of an organization-scoped package on GitHub
131+
### Deleting a version of an organization-scoped package on {% data variables.product.prodname_dotcom %}
128132

129133
To delete a specific version of an organization-scoped package on {% data variables.product.prodname_dotcom %}, such as for a Docker image at `ghcr.io`, use these steps.
130134
To delete an entire package, see "[Deleting an entire organization-scoped package on {% data variables.product.prodname_dotcom %}](#deleting-an-entire-organization-scoped-package-on-github)."
131135

132-
To review who can delete a package version, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)."
136+
To review who can delete a package version, see "[Required permissions to delete or restore a package](#required-permissions-to-delete-or-restore-a-package)."
133137

134138
{% data reusables.package_registry.package-settings-from-org-level %}
135139
{% data reusables.package_registry.package-settings-option %}
@@ -189,18 +193,24 @@ You can restore a deleted package or version if:
189193

190194
For example, if you have a deleted rubygem package named `octo-package` that was scoped to the repo `octo-repo-owner/octo-repo`, then you can only restore the package if the package namespace `rubygem.pkg.github.com/octo-repo-owner/octo-repo/octo-package` is still available, and 30 days have not yet passed.
191195

192-
You must also meet one of these permission requirements:
196+
{% ifversion fpt or ghec %}
197+
To restore a deleted package, you must also meet one of these permission requirements:
193198
- For repository-scoped packages: You have admin permissions to the repository that owns the deleted package.{% ifversion fpt or ghec %}
194199
- For user-account scoped packages: Your user account owns the deleted package.
195200
- For organization-scoped packages: You have admin permissions to the deleted package in the organization that owns the package.{% endif %}
201+
{% endif %}
202+
203+
{% ifversion ghae or ghes %}
204+
To delete a package, you must also have admin permissions to the repository that owns the deleted package.
205+
{% endif %}
196206

197207
For more information, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)."
198208

199209
Once the package is restored, the package will use the same namespace it did before. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
200210

201211
### Restoring a package in an organization
202212

203-
You can restore a deleted package through your organization account settings, as long as the package was in one of your repositories{% ifversion fpt or ghec %} or had granular permissions and was scoped to your organization account{% endif %}.
213+
You can restore a deleted package through your organization account settings, as long as the package was in a repository owned by the organizaton{% ifversion fpt or ghec %} or had granular permissions and was scoped to your organization account{% endif %}.
204214

205215
To review who can restore a package in an organization, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)."
206216

content/packages/learn-github-packages/introduction-to-github-packages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ You can delete a version of a private package in the {% data variables.product.p
112112
You can delete a version of a package in the {% data variables.product.product_name %} user interface or using the GraphQL API.
113113
{% endif %}
114114

115-
When you use the GraphQL API to query and delete private packages, you must use the same token you use to authenticate to {% data variables.product.prodname_registry %}. For more information, see "{% ifversion fpt or ghes > 3.0 or ghec %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 or ghae %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}" and "[Forming calls with GraphQL]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/forming-calls-with-graphql)."
115+
When you use the GraphQL API to query and delete private packages, you must use the same token you use to authenticate to {% data variables.product.prodname_registry %}. For more information, see "{% ifversion fpt or ghes > 3.0 or ghec or ghae %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}" and "[Forming calls with GraphQL]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/forming-calls-with-graphql)."
116116

117117
You can configure webhooks to subscribe to package-related events, such as when a package is published or updated. For more information, see the "[`package` webhook event](/webhooks/event-payloads/#package)."
118118

content/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,4 @@ To install an Apache Maven package from {% data variables.product.prodname_regis
191191
## Further reading
192192

193193
- "[Working with the Gradle registry](/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry)"
194-
- "{% ifversion fpt or ghes > 3.0 or ghec %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 or ghae %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}"
194+
- "{% ifversion fpt or ghes > 3.0 or ghec or ghae %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}"

content/packages/working-with-a-github-packages-registry/working-with-the-docker-registry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,6 @@ $ docker pull <em>HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:TAG_NAME</em>
263263

264264
## Further reading
265265

266-
- "{% ifversion fpt or ghes > 3.0 or ghec %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 or ghae %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}"
266+
- "{% ifversion fpt or ghes > 3.0 or ghec or ghae %}[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package){% elsif ghes < 3.1 %}[Deleting a package](/packages/learn-github-packages/deleting-a-package){% endif %}"
267267

268268
{% endif %} <!-- End of main versioning block -->

0 commit comments

Comments
 (0)