Skip to content

Commit a76f359

Browse files
authored
Hack week 2025: remove unneeded FBV instances (18) - Packages & PATs (#54010)
1 parent 392b52a commit a76f359

20 files changed

+18
-81
lines changed

content/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/re-running-workflows-and-jobs.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,10 @@ gh run rerun --job JOB_ID --debug
123123

124124
{% endcli %}
125125

126-
{% ifversion partial-reruns-with-reusable %}
127-
128126
## Re-running workflows and jobs with reusable workflows
129127

130128
{% data reusables.actions.partial-reruns-with-reusable %}
131129

132-
{% endif %}
133-
134130
## Reviewing previous workflow runs
135131

136132
You can view the results from your previous attempts at running a workflow. You can also view previous workflow runs using the API. For more information, see [AUTOTITLE](/rest/actions/workflow-runs#get-a-workflow-run).

content/actions/sharing-automations/reusing-workflows.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,14 +430,10 @@ For information about using the REST API to query the audit log for an organizat
430430
> [!NOTE]
431431
> Audit data for `prepared_workflow_job` can only be viewed using the REST API. It is not visible in the {% data variables.product.prodname_dotcom %} web interface, or included in JSON/CSV exported audit data.
432432

433-
{% ifversion partial-reruns-with-reusable %}
434-
435433
## Re-running workflows and jobs with reusable workflows
436434

437435
{% data reusables.actions.partial-reruns-with-reusable %}
438436

439-
{% endif %}
440-
441437
## Next steps
442438

443439
To continue learning about {% data variables.product.prodname_actions %}, see [AUTOTITLE](/actions/using-workflows/events-that-trigger-workflows).

content/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-personal-access-tokens-in-your-enterprise.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
title: Enforcing policies for personal access tokens in your enterprise
33
intro: 'Enterprise owners can control access to resources by applying policies to {% data variables.product.pat_generic_plural %}'
44
versions:
5-
feature: pat-v2-enterprise
5+
ghec: '*'
6+
ghes: '*'
67
shortTitle: '{% data variables.product.pat_generic_caps %} policies'
78
redirect_from:
89
- /admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-personal-access-tokens-in-your-enterprise
910
---
1011

1112
> [!NOTE]
12-
> {% data reusables.user-settings.pat-v2-beta %}
13+
> {% data reusables.user-settings.pat-v2-beta %}
1314
>
14-
> During the {% data variables.release-phases.public_preview %}, enterprises must opt in to {% data variables.product.pat_v2_plural %}. If your enterprise has not already opted-in, then you will be prompted to opt-in and set policies when you follow the steps below.
15+
> During the {% data variables.release-phases.public_preview %}, enterprises must opt in to {% data variables.product.pat_v2_plural %}. If your enterprise has not already opted-in, then you will be prompted to opt-in and set policies when you follow the steps below.
1516
>
1617
> Organizations within an enterprise can opt in to {% data variables.product.pat_v2_plural %}, even if the enterprise has not. All users, including {% data variables.product.prodname_emus %}, can create {% data variables.product.pat_v2_plural %} that can access resources owned by the user (such as repositories created under their account) regardless of the enterprise's opt in status.
1718

content/organizations/managing-programmatic-access-to-your-organization/managing-requests-for-personal-access-tokens-in-your-organization.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@ When organization members create a {% data variables.product.pat_v2 %} to access
1919
> [!NOTE]
2020
> Only {% data variables.product.pat_v2 %}s, not {% data variables.product.pat_v1_plural %}, are subject to approval. Unless the organization has restricted access by {% data variables.product.pat_v1_plural %}, any {% data variables.product.pat_v1 %} can access organization resources without prior approval. For more information, see [AUTOTITLE](/organizations/managing-programmatic-access-to-your-organization/setting-a-personal-access-token-policy-for-your-organization).
2121
22-
{% ifversion pat-v2-org-admin-api %}
23-
2422
Organization owners can also use the REST API to review and manage {% data variables.product.pat_v2 %} requests. These endpoints can only be called by {% data variables.product.prodname_github_apps %}, and cannot be called with {% data variables.product.pat_generic_plural %} or {% data variables.product.prodname_oauth_apps %}. For more information, see [AUTOTITLE](/rest/orgs/orgs#list-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens).
2523

26-
{% endif %}
27-
2824
## Managing {% data variables.product.pat_v2 %} requests
2925

3026
{% data reusables.profile.access_org %}

content/organizations/managing-programmatic-access-to-your-organization/reviewing-and-revoking-personal-access-tokens-in-your-organization.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,8 @@ Organization owners can only view and revoke {% data variables.product.pat_v2 %}
2020

2121
{% ifversion ghec %} Organization owners can also view and revoke {% data variables.product.pat_v1_plural %} if their organization requires SAML single-sign on. For more information, see [AUTOTITLE](/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise#viewing-and-revoking-authorized-credentials). For more information about using the REST API to do this, see [List SAML SSO authorizations for an organization](/rest/orgs/orgs#list-saml-sso-authorizations-for-an-organization) and [Remove a SAML SSO authorization for an organization](/rest/orgs/orgs#remove-a-saml-sso-authorization-for-an-organization).{% endif %}
2222

23-
{% ifversion pat-v2-org-admin-api %}
24-
2523
Organization owners can also use the REST API to review and revoke {% data variables.product.pat_v2 %}s. These endpoints can only be called by {% data variables.product.prodname_github_apps %}, and cannot be called with {% data variables.product.pat_generic_plural %} or {% data variables.product.prodname_oauth_apps %}. For more information, see [AUTOTITLE](/rest/orgs/orgs#list-fine-grained-personal-access-tokens-with-access-to-organization-resources).
2624

27-
{% endif %}
28-
2925
## Reviewing and revoking {% data variables.product.pat_v2 %}s
3026

3127
{% data reusables.profile.access_org %}

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,12 @@ On {% data variables.product.prodname_dotcom %}, you can also restore an entire
3636

3737
{% data reusables.package_registry.packages-classic-pat-only %}
3838

39-
{% ifversion packages-rest-api %}
40-
4139
You can use the REST API to manage your packages. For more information, see the [AUTOTITLE](/rest/packages).
4240

4341
{% data reusables.package_registry.delete-with-github-token-using-api-beta %}
4442

4543
With registries that support granular permissions, you can use a `GITHUB_TOKEN` in a {% data variables.product.prodname_actions %} workflow to delete or restore packages using the REST API. The token must have `admin` permission to the package. If your workflow publishes a package, the `admin` role is granted by default to the repository where the workflow is stored. For existing packages not published by a workflow, you need to grant the repository the `admin` role to be able to use a {% data variables.product.prodname_actions %} workflow to delete or restore packages using the REST API. For more information, see [AUTOTITLE](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package).
4644

47-
{% endif %}
48-
4945
{% data reusables.package_registry.about-graphql-support %}
5046

5147
## Required permissions to delete or restore a package
@@ -73,7 +69,7 @@ To delete a version of a repository-scoped package, you must have admin permissi
7369

7470
### Deleting a version of a repository-scoped package with GraphQL
7571

76-
{% data reusables.package_registry.about-graphql-support %}{% ifversion packages-rest-api %} For information on using the REST API instead, see the [AUTOTITLE](/rest/packages).{% endif %}
72+
{% data reusables.package_registry.about-graphql-support %} For information on using the REST API instead, see the [AUTOTITLE](/rest/packages).
7773

7874
Use the `deletePackageVersion` mutation in the GraphQL API. You must use a {% data variables.product.pat_v1 %} with the `read:packages`, `delete:packages`, and `repo` scopes. For more information about {% data variables.product.pat_v1_plural %}, see [AUTOTITLE](/packages/learn-github-packages/introduction-to-github-packages#authenticating-to-github-packages).
7975

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ For more information about Docker and the {% data variables.product.prodname_con
9595

9696
## Managing packages
9797

98-
You can delete a package in the {% data variables.product.product_name %} user interface{% ifversion packages-rest-api %} or using the REST API. For more information, see [AUTOTITLE](/packages/learn-github-packages/deleting-and-restoring-a-package) and the [AUTOTITLE](/rest/packages).{% else %}.{% endif %} {% data reusables.package_registry.about-graphql-support %}
98+
You can delete a package in the {% data variables.product.product_name %} user interface or using the REST API. For more information, see [AUTOTITLE](/packages/learn-github-packages/deleting-and-restoring-a-package) and the [AUTOTITLE](/rest/packages). {% data reusables.package_registry.about-graphql-support %}
9999

100100
When you use the GraphQL API to query and delete private packages, you must use the same {% data variables.product.pat_v1 %} you use to authenticate to {% data variables.product.prodname_registry %}.
101101

content/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,8 @@ After a Docker image has been migrated to the {% data variables.product.prodname
4141

4242
{% data reusables.package_registry.container-registry-migration-namespaces %}
4343

44-
{% ifversion packages-rest-api %}
45-
4644
After migration, you'll no longer be able to use the GraphQL API to query for packages with a `PackageType` of "DOCKER". Instead, you can use the REST API to query for packages with a `package_type` of "container". For more information, see [AUTOTITLE](/rest/packages).
4745

48-
{% endif %}
49-
5046
{% ifversion fpt or ghec %}
5147

5248
## About billing for {% data variables.product.prodname_container_registry %}

content/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ To use the action in your current workflow place this snippet under `jobs`.
3838
- name: Upload GitHub Pages artifact
3939
{%- ifversion fpt or ghec %}
4040
uses: actions/upload-pages-artifact@v3
41-
{%- elsif pages-custom-workflow-ghes3-9 %}
41+
{%- elsif ghes %}
4242
uses: actions/upload-pages-artifact@v2
43-
{%- else %}
44-
uses: actions/upload-pages-artifact@v1
4543
{%- endif %}
4644
```
4745

@@ -75,10 +73,8 @@ jobs:
7573
id: deployment
7674
{%- ifversion fpt or ghec %}
7775
uses: actions/deploy-pages@v4
78-
{%- elsif pages-custom-workflow-ghes3-9 %}
76+
{%- elsif ghes %}
7977
uses: actions/deploy-pages@v3
80-
{%- else %}
81-
uses: actions/deploy-pages@v1
8278
{%- endif %}
8379
# ...
8480
```
@@ -108,10 +104,8 @@ jobs:
108104
- name: Upload artifact
109105
{%- ifversion fpt or ghec %}
110106
uses: actions/upload-pages-artifact@v3
111-
{%- elsif pages-custom-workflow-ghes3-9 %}
107+
{%- elsif ghes %}
112108
uses: actions/upload-pages-artifact@v2
113-
{%- else %}
114-
uses: actions/upload-pages-artifact@v1
115109
{%- endif %}
116110
117111
# Deployment job
@@ -126,10 +120,8 @@ jobs:
126120
id: deployment
127121
{%- ifversion fpt or ghec %}
128122
uses: actions/deploy-pages@v4
129-
{%- elsif pages-custom-workflow-ghes3-9 %}
123+
{%- elsif ghes %}
130124
uses: actions/deploy-pages@v3
131-
{%- else %}
132-
uses: actions/deploy-pages@v1
133125
{%- endif %}
134126
# ...
135127
```
@@ -154,10 +146,8 @@ jobs:
154146
- name: Upload Artifact
155147
{%- ifversion fpt or ghec %}
156148
uses: actions/upload-pages-artifact@v3
157-
{%- elsif pages-custom-workflow-ghes3-9 %}
149+
{%- elsif ghes %}
158150
uses: actions/upload-pages-artifact@v2
159-
{%- else %}
160-
uses: actions/upload-pages-artifact@v1
161151
{%- endif %}
162152
with:
163153
# upload entire directory
@@ -166,10 +156,8 @@ jobs:
166156
id: deployment
167157
{%- ifversion fpt or ghec %}
168158
uses: actions/deploy-pages@v4
169-
{%- elsif pages-custom-workflow-ghes3-9 %}
159+
{%- elsif ghes %}
170160
uses: actions/deploy-pages@v3
171-
{%- else %}
172-
uses: actions/deploy-pages@v1
173161
{%- endif %}
174162
175163
# ...
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1. For each of your accounts, create a dedicated {% data variables.product.pat_v1 %} with `repo` scope. {% ifversion pat-v2 %}Or, for each of your accounts and for each organization that you are a member of, create a {% data variables.product.pat_v2 %} that can access the desired repositories and that has read and write permissions on repository contents.{% endif %} For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
1+
1. For each of your accounts, create a dedicated {% data variables.product.pat_v1 %} with `repo` scope. Or, for each of your accounts and for each organization that you are a member of, create a {% data variables.product.pat_v2 %} that can access the desired repositories and that has read and write permissions on repository contents. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{% ifversion fpt or ghec %}If you are accessing an organization that uses SAML SSO{% ifversion pat-v2 %} and you are using a {% data variables.product.pat_v1 %}{% endif %}, you must also authorize your {% data variables.product.pat_generic %} to access the organization before you authenticate. For more information, see [AUTOTITLE](/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on) and [AUTOTITLE](/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).{% endif %}
1+
{% ifversion fpt or ghec %}If you are accessing an organization that uses SAML SSO and you are using a {% data variables.product.pat_v1 %}, you must also authorize your {% data variables.product.pat_generic %} to access the organization before you authenticate. For more information, see [AUTOTITLE](/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on) and [AUTOTITLE](/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).{% endif %}
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
{% ifversion pat-v2 %}
2-
31
> [!NOTE]
42
> {% data variables.product.prodname_registry %} only supports authentication using a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
5-
6-
{% endif %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
> [!NOTE]
2-
> * {% ifversion pages-custom-workflow %}If you are publishing from a branch and{% else %}If{% endif %} your site has not published automatically, make sure someone with admin permissions and a verified email address has pushed to the publishing source.
2+
> * If you are publishing from a branch and your site has not published automatically, make sure someone with admin permissions and a verified email address has pushed to the publishing source.
33
> * {% data reusables.actions.actions-do-not-trigger-pages-rebuilds %}

data/reusables/pages/new-or-existing-repo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
You can either create a repository or choose an existing repository for your site.
22

3-
If you want to create a {% data variables.product.prodname_pages %} site for a repository where not all of the files in the repository are related to the site, you will be able to configure a publishing source for your site. For example, you can have a dedicated branch and folder to hold your site source {% ifversion pages-custom-workflow %}files, or you can use a custom {% data variables.product.prodname_actions %} workflow to build and deploy your site source files. {% data reusables.actions.settings-ui.settings-actions-pages-custom-workflow %}{% else %}files.{% endif %}
3+
If you want to create a {% data variables.product.prodname_pages %} site for a repository where not all of the files in the repository are related to the site, you will be able to configure a publishing source for your site. For example, you can have a dedicated branch and folder to hold your site source files, or you can use a custom {% data variables.product.prodname_actions %} workflow to build and deploy your site source files. {% data reusables.actions.settings-ui.settings-actions-pages-custom-workflow %}
44

55
{% ifversion fpt or ghec %}If the account that owns the repository uses {% data variables.product.prodname_free_user %} or {% data variables.product.prodname_free_team %} for organizations, the repository must be public.{% endif %}
66

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
{% ifversion pages-custom-workflow %}
2-
31
You can publish your site when changes are pushed to a specific branch, or you can write a {% data variables.product.prodname_actions %} workflow to publish your site. {% data reusables.actions.settings-ui.settings-actions-pages-custom-workflow %}
42

53
If you do not need any control over the build process for your site, we recommend that you publish your site when changes are pushed to a specific branch. {% data reusables.pages.pages-about-branch-source %}
64

75
If you want to use a build process other than Jekyll or you do not want a dedicated branch to hold your compiled static files, we recommend that you write a {% data variables.product.prodname_actions %} workflow to publish your site. {% data variables.product.product_name %} provides workflow templates for common publishing scenarios to help you write your workflow.
8-
9-
{% else %}
10-
11-
Your {% data variables.product.prodname_pages %} site will publish whenever changes are pushed to a specific branch. {% data reusables.pages.pages-about-branch-source %}
12-
13-
{% endif %}

data/reusables/pages/test-locally.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{% ifversion pages-custom-workflow %}If you are publishing from a branch, changes{% else %}Changes{% endif %} to your site are published automatically when the changes are merged into your site's publishing source. {% ifversion pages-custom-workflow %}If you are publishing from a custom {% data variables.product.prodname_actions %} workflow, changes are published whenever your workflow is triggered (typically by a push to the default branch). {% endif %}If you want to preview your changes first, you can make the changes locally instead of on {% data variables.product.product_name %}. Then, test your site locally. For more information, see [AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll).
1+
If you are publishing from a branch, changes to your site are published automatically when the changes are merged into your site's publishing source. If you are publishing from a custom {% data variables.product.prodname_actions %} workflow, changes are published whenever your workflow is triggered (typically by a push to the default branch). If you want to preview your changes first, you can make the changes locally instead of on {% data variables.product.product_name %}. Then, test your site locally. For more information, see [AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll).
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
{% ifversion pat-v2 %}
2-
31
> [!NOTE]
42
> The REST API to manage {% data variables.product.prodname_projects_v1 %} only supports authentication using a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
5-
6-
{% endif %}
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
{% ifversion pat-v2 %}
2-
31
> [!NOTE]
4-
> These endpoints only support authentication using a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
5-
6-
{% endif %}
2+
> These endpoints only support authentication using a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic).
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
{% ifversion pat-v2 %}
2-
31
> [!NOTE]
42
> These endpoints only support authentication using a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
5-
6-
{% endif %}
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
{% ifversion pat-v2 %}
2-
31
> [!NOTE]
42
> These endpoints only support authentication using a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
5-
6-
{% endif %}

0 commit comments

Comments
 (0)