Skip to content

Commit f1cf0ac

Browse files
authored
Merge pull request #44419 from github/repo-sync
Repo sync
2 parents ac4b127 + 3d3ad6f commit f1cf0ac

36 files changed

Lines changed: 797 additions & 380 deletions
32.2 KB
Loading
53.8 KB
Loading
17.4 KB
Loading
12.2 KB
Loading
-72.4 KB
Loading

content/actions/concepts/security/github_token.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ The token is also available in the `github.token` context. For more information,
2929

3030
{% data reusables.actions.actions-do-not-trigger-workflows %}
3131

32+
{% ifversion actions-github-token-pull-request-approval %}
33+
> [!NOTE]
34+
> If you need workflow runs from workflow-created pull requests to execute without requiring approval, use a {% data variables.product.prodname_github_app %} installation access token or a {% data variables.product.pat_generic %} instead of `GITHUB_TOKEN` when creating or updating the pull request.
35+
{% endif %}
36+
3237
{% data reusables.actions.actions-do-not-trigger-pages-rebuilds %}
3338

3439
## Next steps

content/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To learn more about workflows and triggering workflows, see [AUTOTITLE](/actions
2525

2626
{% data reusables.actions.actions-do-not-trigger-workflows %} For more information, see [AUTOTITLE](/actions/security-guides/automatic-token-authentication).
2727

28-
If you do want to trigger a workflow from within a workflow run, you can use a {% data variables.product.prodname_github_app %} installation access token or a {% data variables.product.pat_generic %} instead of `GITHUB_TOKEN` to trigger events that require a token.
28+
If you do want to trigger a workflow from within a workflow run, you can use a {% data variables.product.prodname_github_app %} installation access token or a {% data variables.product.pat_generic %} instead of `GITHUB_TOKEN` to trigger events that require a token.{% ifversion actions-github-token-pull-request-approval %} Using one of these alternatives also lets `pull_request` workflows run automatically (without the approval prompt described above) when the pull request is created or updated by automation.{% endif %}
2929

3030
If you use a {% data variables.product.prodname_github_app %}, you'll need to create a {% data variables.product.prodname_github_app %} and store the app ID and private key as secrets. For more information, see [AUTOTITLE](/apps/creating-github-apps/guides/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow). If you use a {% data variables.product.pat_generic %}, you'll need to create a {% data variables.product.pat_generic %} and store it as a secret. For more information about creating a {% data variables.product.pat_generic %}, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). For more information about storing secrets, see [AUTOTITLE](/actions/security-guides/using-secrets-in-github-actions).
3131

content/actions/reference/workflows-and-actions/events-that-trigger-workflows.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,8 @@ on:
510510
> [!NOTE]
511511
> * {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see [AUTOTITLE](/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request). By default, a workflow only runs when a `pull_request` event's activity type is `opened`, `synchronize`, or `reopened`. To trigger workflows by different activity types, use the `types` keyword. For more information, see [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onevent_nametypes).
512512
> * Workflows will not run on `pull_request` activity if the pull request has a merge conflict. The merge conflict must be resolved first. Conversely, workflows with the `pull_request_target` event will run even if the pull request has a merge conflict. Before using the `pull_request_target` trigger, you should be aware of the security risks. For more information, see [`pull_request_target`](#pull_request_target).
513-
> * The `pull_request` webhook event payload is empty for merged pull requests and pull requests that come from forked repositories.
513+
> * The `pull_request` webhook event payload is empty for merged pull requests and pull requests that come from forked repositories.{% ifversion actions-github-token-pull-request-approval %}
514+
> * When a pull request is created or updated by a workflow using `GITHUB_TOKEN`, `pull_request` events with the `opened`, `synchronize`, or `reopened` activity types create workflow runs that require approval. A user with write access to the repository can approve these runs from the pull request page. With the exception of `workflow_dispatch` and `repository_dispatch`, other `GITHUB_TOKEN`-triggered events do not create workflow runs at all.{% endif %}
514515
> * The value of `GITHUB_REF` varies for a closed pull request depending on whether the pull request has been merged or not. If a pull request was closed but not merged, it will be `refs/pull/PULL_REQUEST_NUMBER/merge`. If a pull request was closed as a result of being merged, it will be the fully qualified `ref` of the branch it was merged into, for example `/refs/heads/main`.
515516

516517
Runs your workflow when activity on a pull request in the workflow's repository occurs. For example, if no activity types are specified, the workflow runs when a pull request is opened or reopened or when the head branch of the pull request is updated. For activity related to pull request reviews, pull request review comments, or pull request comments, use the [`pull_request_review`](#pull_request_review), [`pull_request_review_comment`](#pull_request_review_comment), or [`issue_comment`](#issue_comment) events instead. For information about the pull request APIs, see [AUTOTITLE](/graphql/reference/objects#pullrequest) in the GraphQL API documentation or [AUTOTITLE](/rest/pulls).

content/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens.md

Lines changed: 0 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -117,160 +117,6 @@ For more information about best practices, see [AUTOTITLE](/rest/overview/keepin
117117

118118
If you selected an organization as the resource owner and the organization requires approval for {% data variables.product.pat_v2 %}s, then your token will be marked as `pending` until it is reviewed by an organization administrator. Your token will only be able to read public resources until it is approved. If you are an owner of the organization, your request is automatically approved. For more information, see [AUTOTITLE](/organizations/managing-programmatic-access-to-your-organization/reviewing-and-revoking-personal-access-tokens-in-your-organization).
119119

120-
### Pre-filling {% data variables.product.pat_v2 %} details using URL parameters
121-
122-
You can share templates for a {% data variables.product.pat_v2 %} via links. Storing token details this way makes it easier to automate workflows and improve your developer experience by directing users to token creation with relevant fields already completed.
123-
124-
Each supported field can be set using a specific query parameter. All parameters are optional and validated by the token generation form to ensure that the combinations of permissions and resource owner makes sense.
125-
126-
An example URL template is shown here, with line breaks for legibility:
127-
128-
```http copy
129-
https://github.com/settings/personal-access-tokens/new
130-
?name=Repo-reading+token
131-
&description=Just+contents:read
132-
&target_name=octodemo
133-
&expires_in=45
134-
&contents=read
135-
```
136-
137-
Try the URL to create a token with `contents:read` and `metadata:read`, with the given name and description and an expiration date 45 days in the future. You'll see an error message indicating `Cannot find the specified resource owner: octodemo` because you're not a member of the `octodemo` organization.
138-
139-
Below are some example URLs that generate the tokens we see most often:
140-
141-
* [Read repo contents](https://github.com/settings/personal-access-tokens/new?name=Repo-reading+token&description=Just+contents:read&contents=read)
142-
* [Push access to repos](https://github.com/settings/personal-access-tokens/new?name=Repo-writing+token&description=Just+contents:write&contents=write)
143-
* [GitHub Models access](https://github.com/settings/personal-access-tokens/new?name=GitHub+Models+token&description=Used%20to%20call%20GitHub%20Models%20APIs%20to%20easily%20run%20LLMs%3A%20https%3A%2F%2Fdocs.github.com%2Fgithub-models%2Fquickstart%23step-2-make-an-api-call&user_models=read)<!-- markdownlint-disable-line search-replace Custom rule -->
144-
* [Update code and open a PR](https://github.com/settings/personal-access-tokens/new?name=Core-loop+token&description=Write%20code%20and%20push%20it%20to%20main%21%20Includes%20permission%20to%20edit%20workflow%20files%20for%20Actions%20-%20remove%20%60workflows%3Awrite%60%20if%20you%20don%27t%20need%20to%20do%20that&contents=write&pull_requests=write&workflows=write)
145-
* [Manage Copilot licenses in an organization](https://github.com/settings/personal-access-tokens/new?name=Core-loop+token&description=Enable%20or%20disable%20copilot%20access%20for%20users%20with%20the%20Seat%20Management%20APIs%3A%20https%3A%2F%2Fdocs.github.com%2Frest%2Fcopilot%2Fcopilot-user-management%0ABe%20sure%20to%20select%20an%20organization%20for%20your%20resource%20owner%20below%21&organization_copilot_seat_management=write)<!-- markdownlint-disable-line search-replace Custom rule -->
146-
* [Make Copilot requests](https://github.com/settings/personal-access-tokens/new?name=Copilot+requests+token&description=Make%20Copilot%20API%20requests%20on%20behalf%20of%20the%20user%2C%20consuming%20premium%20requests%3A%20https%3A%2F%2Fdocs.github.com%2Fcopilot%2Fconcepts%2Fbilling%2Fcopilot-requests&user_copilot_requests=read)<!-- markdownlint-disable-line search-replace Custom rule -->
147-
148-
#### Supported Query Parameters
149-
150-
To create your own token template, follow the query parameter details provided in this table:
151-
152-
| Parameter | Type | Example Value | Valid Values | Description |
153-
|----------------|--------|------------------|--------------|-----------------------|
154-
| `name` | string | `Deploy%20Bot` | ≤ 40 characters, URL-encoded | Pre-fills the token’s display name. |
155-
| `description` | string | `Used+for+deployments` | ≤ 1024 chars, URL-encoded | Pre-fills the description for the token. |
156-
| `target_name` | string | `octodemo` | User or organization slug | Sets the token's resource target. This is the owner of the repositories that the token will be able to access. If not provided, defaults to the current user's account. |
157-
| `expires_in` | integer| `30` or `none` | Integer between 1 and 366, or `none` | Days until expiration or `none` for non-expiring. If not provided, the default is 30 days, or less if the target has a token lifetime policy set. |
158-
| `<permission>` | string | `contents=read` | A series of permission and access levels. | The permissions the token should have. Permissions can be set to `read`, `write`, or `admin`, but not every permission supports each of those levels. |
159-
160-
#### Permissions
161-
162-
Each supported permission is set using its name as a query parameter, with the value specifying the desired access level. Valid access levels are `read`, `write`, and `admin`. Some permissions only support `read`, some only support `write`, and only a few have `admin`. Use as many permissions as needed, in the form `&contents=read&pull_requests=write&...`.
163-
164-
You do not need to include both `read` and `write` for a permission in your URL—`write` always includes `read`, and `admin` always includes `write`.
165-
166-
##### Account Permissions
167-
168-
Account permissions are only used when the current user is set as the resource owner.
169-
170-
| Parameter name | Display name | Access levels |
171-
|---|---|---|
172-
| `blocking` | Block another user | `read`, `write` |
173-
| `codespaces_user_secrets` | Codespaces user secrets | `read`, `write` |
174-
| `copilot_messages` | Copilot Chat | `read` |
175-
| `copilot_editor_context` | Copilot Editor Context | `read` |
176-
| `copilot_requests` | Copilot requests | `write` |
177-
| `emails` | Email addresses | `read`, `write` |
178-
| `user_events` | Events | `read` |
179-
| `followers` | Followers | `read`, `write` |
180-
| `gpg_keys` | GPG keys | `read`, `write` |
181-
| `gists` | Gists | `write` |
182-
| `keys` | Git SSH keys | `read`, `write` |
183-
| `interaction_limits` | Interaction limits | `read`, `write` |
184-
| `knowledge_bases` | Knowledge bases | `read`, `write` |
185-
| `user_models` | Models | `read` |
186-
| `plan` | Plan | `read` |
187-
| `private_repository_invitations` | Private repository invitations | `read` |
188-
| `profile` | Profile | `write` |
189-
| `git_signing_ssh_public_keys` | SSH signing keys | `read`, `write` |
190-
| `starring` | Starring | `read`, `write` |
191-
| `watching` | Watching | `read`, `write` |
192-
193-
{% ifversion copilot %}
194-
195-
> [!NOTE]
196-
> The `copilot_requests` permission enables making {% data variables.product.prodname_copilot_short %} requests for the given user, which count towards the user's premium request allowance or are charged to overage billing if the allowance is exceeded. For more information about {% data variables.product.prodname_copilot_short %} requests and billing, see [AUTOTITLE](/copilot/concepts/billing/copilot-requests).
197-
198-
{% endif %}
199-
##### Repository Permissions
200-
201-
Repository permissions work for both user and organization resource owners.
202-
203-
| Parameter name | Display name | Access levels |
204-
|---|---|---|
205-
| `actions` | Actions | `read`, `write` |
206-
| `administration` | Administration | `read`, `write` |
207-
| {% ifversion artifact-metadata %} |
208-
| `artifact_metadata` | Artifact Metadata | `read`, `write` |
209-
| {% endif %} |
210-
| `attestations` | Attestations | `read`, `write` |
211-
| {% ifversion code-quality %} |
212-
| `code_quality` | Code quality | `read`, `write` |
213-
| {% endif %} |
214-
| `security_events` | Code scanning alerts | `read`, `write` |
215-
| `codespaces` | Codespaces | `read`, `write` |
216-
| `codespaces_lifecycle_admin` | Codespaces lifecycle admin | `read`, `write` |
217-
| `codespaces_metadata` | Codespaces metadata | `read` |
218-
| `codespaces_secrets` | Codespaces secrets | `write` |
219-
| `statuses` | Commit statuses | `read`, `write` |
220-
| `contents` | Contents | `read`, `write` |
221-
| `repository_custom_properties` | Custom properties | `read`, `write` |
222-
| `vulnerability_alerts` | Dependabot alerts | `read`, `write` |
223-
| `dependabot_secrets` | Dependabot secrets | `read`, `write` |
224-
| `deployments` | Deployments | `read`, `write` |
225-
| `discussions` | Discussions | `read`, `write` |
226-
| `environments` | Environments | `read`, `write` |
227-
| `issues` | Issues | `read`, `write` |
228-
| `merge_queues` | Merge queues | `read`, `write` |
229-
| `metadata` | Metadata | `read` |
230-
| `pages` | Pages | `read`, `write` |
231-
| `pull_requests` | Pull requests | `read`, `write` |
232-
| `repository_advisories` | Repository security advisories | `read`, `write` |
233-
| `secret_scanning_alerts` | Secret scanning alerts | `read`, `write` |
234-
| `secrets` | Secrets | `read`, `write` |
235-
| `actions_variables` | Variables | `read`, `write` |
236-
| `repository_hooks` | Webhooks | `read`, `write` |
237-
| `workflows` | Workflows | `write` |
238-
239-
##### Organization Permissions
240-
241-
Organization permissions can only be used if the resource owner is an organization.
242-
243-
| Parameter name | Display name | Access levels |
244-
|---|---|---|
245-
| `organization_api_insights` | API Insights | `read` |
246-
| `organization_administration` | Administration | `read`, `write` |
247-
| `organization_user_blocking` | Blocking users | `read`, `write` |
248-
| `organization_campaigns` | Campaigns | `read`, `write` |
249-
| `organization_custom_org_roles` | Custom organization roles | `read`, `write` |
250-
| `organization_custom_properties` | Custom repository properties | `read`, `write`, `admin` |
251-
| `organization_custom_roles` | Custom repository roles | `read`, `write` |
252-
| `organization_events` | Events | `read` |
253-
| `organization_copilot_seat_management` | GitHub Copilot Business | `read`, `write` |
254-
| `issue_types` | Issue Types | `read`, `write` |
255-
| `organization_knowledge_bases` | Knowledge bases | `read`, `write` |
256-
| `members` | Members | `read`, `write` |
257-
| `organization_models` | Models | `read` |
258-
| `organization_network_configurations` | Network configurations | `read`, `write` |
259-
| `organization_announcement_banners` | Organization announcement banners | `read`, `write` |
260-
| `organization_codespaces` | Organization codespaces | `read`, `write` |
261-
| `organization_codespaces_secrets` | Organization codespaces secrets | `read`, `write` |
262-
| `organization_codespaces_settings` | Organization codespaces settings | `read`, `write` |
263-
| `organization_dependabot_secrets` | Organization dependabot secrets | `read`, `write` |
264-
| `organization_code_scanning_dismissal_requests` | Code scanning dismissal requests | `read`, `write` |
265-
| `organization_private_registries` | Private registries | `read`, `write` |
266-
| `organization_plan` | Plan | `read` |
267-
| `organization_projects` | Projects | `read`, `write`, `admin` |
268-
| `organization_secrets` | Secrets | `read`, `write` |
269-
| `organization_self_hosted_runners` | Self-hosted runners | `read`, `write` |
270-
| `team_discussions` | Team discussions | `read`, `write` |
271-
| `organization_actions_variables` | Variables | `read`, `write` |
272-
| `organization_hooks` | Webhooks | `read`, `write` |
273-
274120
## Creating a {% data variables.product.pat_v1 %}
275121

276122
> [!NOTE]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: Get started content type
3+
intro: Get started content provides the minimal essential information to use a product or feature.
4+
versions:
5+
fpt: '*'
6+
ghec: '*'
7+
ghes: '*'
8+
category:
9+
- Follow the style guide and content model
10+
---
11+
12+
Get started content provides an entry point into using GitHub products and features. This section should contain only the minimum essential information a user needs before they move on to concepts and how-tos. We do this to be concise, and also so it doesn't seem complicated just to get started with a feature.
13+
14+
## Get started considerations
15+
16+
Get started is a set of articles which should be easy and fast to scan. It should contain fewer than 5 articles, and ideally only two:
17+
* Quickstart
18+
* About [PRODUCT] (or “What is [PRODUCT]”)
19+
20+
The one exception to this may be with available plans and billing information, where such information is required to use the product or feature.
21+
22+
For more information on quickstart content, see [AUTOTITLE](/contributing/style-guide-and-content-model/quickstart-content-type).
23+
24+
In particular, articles with this information do not belong in Get started:
25+
* Articles that fall under the how-to content type.
26+
* Set up or sign up steps: these are also how-tos. They document how to do something in the UI.
27+
* Content that is useful for getting started with a particular feature but not the whole product area. This kind of content more properly belongs in Concepts.
28+
* Best practices, generally. Users new to a feature lack the context necessary to make the most of these.
29+
30+

0 commit comments

Comments
 (0)