Skip to content

Commit 7f3a311

Browse files
authored
Merge branch 'main' into janiceilene-patch-3
2 parents 7b0915c + ef1184d commit 7f3a311

25 files changed

Lines changed: 202 additions & 64 deletions

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ A job is a set of steps that execute on the same runner. By default, a workflow
4242

4343
#### Steps
4444

45-
A step is an individual task that can run commands (known as _actions_). Each step in a job executes on the same runner, allowing the actions in that job to share data with each other.
45+
A step is an individual task that can run commands in a job. A step can be either an _action_ or a shell command. Each step in a job executes on the same runner, allowing the actions in that job to share data with each other.
4646

4747
#### Actions
4848

4949
_Actions_ are standalone commands that are combined into _steps_ to create a _job_. Actions are the smallest portable building block of a workflow. You can create your own actions, or use actions created by the {% data variables.product.prodname_dotcom %} community. To use an action in a workflow, you must include it as a step.
5050

5151
#### Runners
5252

53-
A runner is a server that has the {% data variables.product.prodname_actions %} runner application installed. You can use a runner hosted by {% data variables.product.prodname_dotcom %}, or you can host your own. A runner listens for available jobs, runs one job at a time, and reports the progress, logs, and results back to {% data variables.product.prodname_dotcom %}. For {% data variables.product.prodname_dotcom %}-hosted runners, each job in a workflow runs in a fresh virtual environment.
53+
A runner is a server that has the [{% data variables.product.prodname_actions %} runner application](https://github.com/actions/runner) installed. You can use a runner hosted by {% data variables.product.prodname_dotcom %}, or you can host your own. A runner listens for available jobs, runs one job at a time, and reports the progress, logs, and results back to {% data variables.product.prodname_dotcom %}. For {% data variables.product.prodname_dotcom %}-hosted runners, each job in a workflow runs in a fresh virtual environment.
5454

5555
{% data variables.product.prodname_dotcom %}-hosted runners are based on Ubuntu Linux, Microsoft Windows, and macOS. For information on {% data variables.product.prodname_dotcom %}-hosted runners, see "[Virtual environments for {% data variables.product.prodname_dotcom %}-hosted runners](/actions/reference/virtual-environments-for-github-hosted-runners)." If you need a different operating system or require a specific hardware configuration, you can host your own runners. For information on self-hosted runners, see "[Hosting your own runners](/actions/hosting-your-own-runners)."
5656

@@ -197,7 +197,7 @@ To help you understand how YAML syntax is used to create a workflow file, this s
197197
198198
#### Visualizing the workflow file
199199
200-
In this diagram, you can see the workflow file you just created and how the {% data variables.product.prodname_actions %} components are organized in a hierarchy. Each step executes a single action. Steps 1 and 2 use prebuilt community actions. To find more prebuilt actions for your workflows, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)."
200+
In this diagram, you can see the workflow file you just created and how the {% data variables.product.prodname_actions %} components are organized in a hierarchy. Each step executes a single action or shell command. Steps 1 and 2 use prebuilt community actions. Steps 3 and 4 run shell commands directly on the runner. To find more prebuilt actions for your workflows, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)."
201201
202202
![Workflow overview](/assets/images/help/images/overview-actions-event.png)
203203

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ The `issue_comment` event occurs for comments on both issues and pull requests.
327327

328328
For example, you can choose to run the `pr_commented` job when comment events occur in a pull request, and the `issue_commented` job when comment events occur in an issue.
329329

330+
{% raw %}
330331
```yaml
331332
on: issue_comment
332333
@@ -349,6 +350,7 @@ jobs:
349350
- run: |
350351
echo "Comment on issue #${{ github.event.issue.number }}"
351352
```
353+
{% endraw %}
352354

353355
#### `issues`
354356

content/actions/reference/workflow-syntax-for-github-actions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ steps:
446446
uses: monacorp/action-name@main
447447
- name: My backup step
448448
if: {% raw %}${{ failure() }}{% endraw %}
449-
uses: actions/heroku@master
449+
uses: actions/heroku@1.0.0
450450
```
451451

452452
#### **`jobs.<job_id>.steps.name`**
@@ -492,7 +492,7 @@ jobs:
492492
steps:
493493
- name: My first step
494494
# Uses the default branch of a public repository
495-
uses: actions/heroku@master
495+
uses: actions/heroku@1.0.0
496496
- name: My second step
497497
# Uses a specific version tag of a public repository
498498
uses: actions/aws@v2.0.1
@@ -659,7 +659,7 @@ For built-in shell keywords, we provide the following defaults that are executed
659659

660660
- `cmd`
661661
- There doesn't seem to be a way to fully opt into fail-fast behavior other than writing your script to check each error code and respond accordingly. Because we can't actually provide that behavior by default, you need to write this behavior into your script.
662-
- `cmd.exe` will exit with the error level of the last program it executed, and it will and return the error code to the runner. This behavior is internally consistent with the previous `sh` and `pwsh` default behavior and is the `cmd.exe` default, so this behavior remains intact.
662+
- `cmd.exe` will exit with the error level of the last program it executed, and it will return the error code to the runner. This behavior is internally consistent with the previous `sh` and `pwsh` default behavior and is the `cmd.exe` default, so this behavior remains intact.
663663

664664
#### **`jobs.<job_id>.steps.with`**
665665

@@ -718,7 +718,7 @@ steps:
718718
entrypoint: /a/different/executable
719719
```
720720

721-
The `entrypoint` keyword is meant to use with Docker container actions, but you can also use it with JavaScript actions that don't define any inputs.
721+
The `entrypoint` keyword is meant to be used with Docker container actions, but you can also use it with JavaScript actions that don't define any inputs.
722722

723723
#### **`jobs.<job_id>.steps.env`**
724724

content/developers/apps/rate-limits-for-github-apps.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ Different server-to-server request rate limits apply to {% data variables.produc
3434

3535
### User-to-server requests
3636

37-
{% data reusables.apps.deprecating_password_auth %}
38-
3937
{% data variables.product.prodname_github_app %}s can also act [on behalf of a user](/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-and-authorizing-users-for-github-apps), making user-to-server requests.
4038

4139
{% if currentVersion == "free-pro-team@latest" %}
@@ -52,7 +50,7 @@ User-to-server requests are rate limited at 5,000 requests per hour and per auth
5250

5351
#### {% data variables.product.prodname_ghe_cloud %} user-to-server rate limits
5452

55-
When a user belongs to a {% data variables.product.prodname_ghe_cloud %} account, user-to-server requests to resources owned by the same {% data variables.product.prodname_ghe_cloud %} account are rate limited at 15,000 requests per hour and per authenticated user. All OAuth applications authorized by that user, personal access tokens owned by that user, and requests authenticated with that user's username and password share the same quota of 5,000 requests per hour for that user.
53+
When a user belongs to a {% data variables.product.prodname_ghe_cloud %} account, user-to-server requests to resources owned by the same {% data variables.product.prodname_ghe_cloud %} account are rate limited at 15,000 requests per hour and per authenticated user. All OAuth applications authorized by that user, personal access tokens owned by that user, and {% data variables.product.prodname_ghe_cloud %} requests authenticated with that user's username and password share the same quota of 5,000 requests per hour for that user.
5654

5755
{% endif %}
5856

content/github/site-policy/github-additional-product-terms.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ versions:
44
free-pro-team: '*'
55
---
66

7-
Version Effective Date: November 1, 2020
7+
Version Effective Date: November 13, 2020
88

99
When you create an Account, you're given access to lots of different features and products that are all a part of the Service. Because many of these features and products offer different functionality, they may require additional terms and conditions specific to that feature or product. Below, we've listed those features and products, along with the corresponding additional terms that apply to your use of them.
1010

@@ -89,7 +89,7 @@ In order to become a Sponsored Developer, you must agree to the [GitHub Sponsors
8989

9090
### 9. GitHub Advanced Security
9191

92-
GitHub Advanced Security enables you to identify security vulnerabilities through customizable and automated semantic code analysis. GitHub Advanced Security is licensed on a per User basis. If you are using GitHub Advanced Security as part of GitHub Enterprise Cloud, many features of GitHub Advanced Security, including automated code scanning of private repositories, also require the use of GitHub Actions. Billing for usage of GitHub Actions is usage-based and is subject to the [GitHub Actions terms](/github/site-policy/github-additional-product-terms#c-payment-and-billing-for-actions-and-packages).
92+
GitHub Advanced Security is licensed on a "Unique Committer" basis. A "Unique Committer" is a licensed user of GitHub Enterprise, GitHub Enterprise Cloud, GitHub Enterprise Server, or GitHub AE, who has made a code commit in the last 90 days to any repository with any GitHub Advanced Security functionality activated. You must acquire a GitHub Advanced Security User license for each of your Unique Committers. You may only use GitHub Advanced Security on codebases that are developed by or for you. If you are using GitHub Advanced Security as part of GitHub Enterprise Cloud, many features of GitHub Advanced Security, including automated code scanning of private repositories, also require the use of GitHub Actions.
9393

9494
### 10. Dependabot Preview
9595

@@ -108,4 +108,3 @@ We need the legal right to submit your contributions to the GitHub Advisory Data
108108
#### b. License to the GitHub Advisory Database
109109

110110
The GitHub Advisory Database is licensed under the [Creative Commons Attribution 4.0 license](https://creativecommons.org/licenses/by/4.0/). The attribution term may be fulfilled by linking to the GitHub Advisory Database at <https://github.com/advisories> or to individual GitHub Advisory Database records used, prefixed by <https://github.com/advisories>.
111-

content/rest/overview/other-authentication-methods.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,19 @@ $ curl -u <em>username</em>:<em>token</em> {% data variables.product.api_url_pre
4646

4747
This approach is useful if your tools only support Basic Authentication but you want to take advantage of OAuth access token security features.
4848

49-
{% if enterpriseServerVersions contains currentVersion %}
5049
#### Via username and password
5150

52-
{% data reusables.apps.deprecating_password_auth %}
51+
{% if currentVersion == "free-pro-team@latest" %}
52+
53+
{% note %}
5354

55+
**Note:** {% data variables.product.prodname_dotcom %} has discontinued password authentication to the API starting on November 13, 2020 for all {% data variables.product.prodname_dotcom_the_website %} accounts, including those on a {% data variables.product.prodname_free_user %}, {% data variables.product.prodname_pro %}, {% data variables.product.prodname_team %}, or {% data variables.product.prodname_ghe_cloud %} plan. You must now authenticate to the {% data variables.product.prodname_dotcom %} API with an API token, such as an OAuth access token, GitHub App installation access token, or personal access token, depending on what you need to do with the token. For more information, see "[Troubleshooting](/rest/overview/troubleshooting#basic-authentication-errors)."
56+
57+
{% endnote %}
58+
59+
{% endif %}
60+
61+
{% if enterpriseServerVersions contains currentVersion %}
5462
To use Basic Authentication with the {% data variables.product.product_name %} API, simply send the username and
5563
password associated with the account.
5664

@@ -100,14 +108,13 @@ The value `organizations` is a comma-separated list of organization IDs for orga
100108
{% if currentVersion == "free-pro-team@latest" or enterpriseServerVersions contains currentVersion %}
101109
### Working with two-factor authentication
102110

103-
{% data reusables.apps.deprecating_password_auth %}
104-
105-
When you have two-factor authentication enabled, [Basic Authentication](#basic-authentication) for _most_ endpoints in the REST API requires that you use a personal access token or OAuth token instead of your username and password.
106-
107-
You can generate a new personal access token {% if currentVersion == "free-pro-team@latest" %}with [{% data variables.product.product_name %} developer settings](https://github.com/settings/tokens/new){% endif %} or use the "[Create a new authorization][create-access]" endpoint in the OAuth Authorizations API to generate a new OAuth token. For more information, see "[Creating a personal access token for the command line](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)". Then you would use these tokens to [authenticate using OAuth token][oauth-auth] with the GitHub API. The only time you need to authenticate with your username and password is when you create your OAuth token or use the OAuth Authorizations API.
111+
When you have two-factor authentication enabled, [Basic Authentication](#basic-authentication) for _most_ endpoints in the REST API requires that you use a personal access token{% if enterpriseServerVersions contains currentVersion %} or OAuth token instead of your username and password{% endif %}.
108112

113+
You can generate a new personal access token {% if currentVersion == "free-pro-team@latest" %}using [{% data variables.product.product_name %} developer settings](https://github.com/settings/tokens/new){% endif %}{% if enterpriseServerVersions contains currentVersion %} or with the "[Create a new authorization][/rest/reference/oauth-authorizations#create-a-new-authorization]" endpoint in the OAuth Authorizations API to generate a new OAuth token{% endif %}. For more information, see "[Creating a personal access token for the command line](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)". Then you would use these tokens to [authenticate using OAuth token][oauth-auth] with the {% data variables.product.prodname_dotcom %} API.{% if enterpriseServerVersions contains currentVersion %} The only time you need to authenticate with your username and password is when you create your OAuth token or use the OAuth Authorizations API.{% endif %}
109114

115+
{% endif %}
110116

117+
{% if enterpriseServerVersions contains currentVersion %}
111118
#### Using the OAuth Authorizations API with two-factor authentication
112119

113120
When you make calls to the OAuth Authorizations API, Basic Authentication requires that you use a one-time password (OTP) and your username and password instead of tokens. When you attempt to authenticate with the OAuth Authorizations API, the server will respond with a `401 Unauthorized` and one of these headers to let you know that you need a two-factor authentication code:
@@ -126,7 +133,6 @@ $ curl --request POST \
126133
```
127134
{% endif %}
128135

129-
[create-access]: /v3/oauth_authorizations/#create-a-new-authorization
130136
[curl]: http://curl.haxx.se/
131137
[oauth-auth]: /v3/#authentication
132138
[personal-access-tokens]: /articles/creating-a-personal-access-token-for-the-command-line

content/rest/overview/resources-in-the-rest-api.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ the API will temporarily reject all authentication attempts for that user
150150
(including ones with valid credentials) with `403 Forbidden`:
151151
152152
```shell
153-
$ curl -i {% data variables.product.api_url_pre %} -u valid_username:valid_password
153+
$ curl -i {% data variables.product.api_url_pre %} -u {% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" %}
154+
-u <em>valid_username</em>:<em>valid_token</em> {% endif %}{% if enterpriseServerVersions contains currentVersion %}-u <em>valid_username</em>:<em>valid_password</em> {% endif %}
154155
> HTTP/1.1 403 Forbidden
155-
156156
> {
157157
> "message": "Maximum number of login attempts exceeded. Please try again later.",
158158
> "documentation_url": "{% data variables.product.doc_url_pre %}/v3"
@@ -185,19 +185,10 @@ $ curl -i -u username -d '{"scopes":["public_repo"]}' {% data variables.product.
185185
You can issue a `GET` request to the root endpoint to get all the endpoint categories that the REST API supports:
186186
187187
```shell
188-
$ curl {% if currentVersion == "github-ae@latest" %}-u <em>username</em>:<em>token</em> {% endif %}{% if currentVersion == "free-pro-team@latest" or enterpriseServerVersions contains currentVersion %}-u <em>username</em>:<em>password</em> {% endif %}{% data variables.product.api_url_pre %}
188+
$ curl {% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" %}
189+
-u <em>username</em>:<em>token</em> {% endif %}{% if enterpriseServerVersions contains currentVersion %}-u <em>username</em>:<em>password</em> {% endif %}{% data variables.product.api_url_pre %}
189190
```
190191
191-
{% if currentVersion == "free-pro-team@latest" or enterpriseServerVersions contains currentVersion %}
192-
193-
{% note %}
194-
195-
**Note:** For {% data variables.product.prodname_ghe_server %}, [as with all other endpoints](/v3/enterprise-admin/#endpoint-urls), you'll need to pass your username and password.
196-
197-
{% endnote %}
198-
199-
{% endif %}
200-
201192
### GraphQL global node IDs
202193
203194
See the guide on "[Using Global Node IDs](/v4/guides/using-global-node-ids)" for detailed information about how to find `node_id`s via the REST API and use them in GraphQL operations.

content/rest/overview/troubleshooting.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ versions:
1414
If you're encountering some oddities in the API, here's a list of resolutions to
1515
some of the problems you may be experiencing.
1616

17-
### Why am I getting a `404` error on a repository that exists?
17+
### `404` error for an existing repository
1818

1919
Typically, we send a `404` error when your client isn't properly authenticated.
2020
You might expect to see a `403 Forbidden` in these cases. However, since we don't
@@ -23,7 +23,7 @@ want to provide _any_ information about private repositories, the API returns a
2323

2424
To troubleshoot, ensure [you're authenticating correctly](/guides/getting-started/), [your OAuth access token has the required scopes](/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), and [third-party application restrictions][oap-guide] are not blocking access.
2525

26-
### Why am I not seeing all my results?
26+
### Not all results returned
2727

2828
Most API calls accessing a list of resources (_e.g._, users, issues, _etc._) support
2929
pagination. If you're making requests and receiving an incomplete set of results, you're
@@ -35,3 +35,40 @@ API call uses the same structure. Instead, extract the pagination information fr
3535
[the Link Header](/v3/#pagination), which is sent with every request.
3636

3737
[oap-guide]: https://developer.github.com/changes/2015-01-19-an-integrators-guide-to-organization-application-policies/
38+
39+
{% if currentVersion == "free-pro-team@latest" %}
40+
### Basic authentication errors
41+
42+
On November 13, 2020 username and password authentication to the REST API and the OAuth Authorizations API were deprecated and no longer work.
43+
44+
#### Using `username`/`password` for basic authentication
45+
46+
If you're using `username` and `password` for API calls, then they are no longer able to authenticate. For example:
47+
48+
```bash
49+
curl -u my_user:my_password https://api.github.com/user/repos
50+
```
51+
52+
Instead, use a [personal access token](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) when testing endpoints or doing local development:
53+
54+
```bash
55+
curl -H 'Authorization: token my_access_token' https://api.github.com/user/repos
56+
```
57+
58+
For OAuth Apps, you should use the [web application flow](/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to generate an OAuth token to use in the API call's header:
59+
60+
```bash
61+
curl -H 'Authorization: token my-oauth-token' https://api.github.com/user/repos
62+
```
63+
64+
#### Calls to OAuth Authorizations API
65+
66+
If you're making [OAuth Authorization API](/enterprise-server@2.22/rest/reference/oauth-authorizations) calls to manage your OAuth app's authorizations or to generate access tokens, similar to this example:
67+
68+
```bash
69+
curl -u my_username:my_password -X POST "https://api.github.com/authorizations" -d '{"scopes":["public_repo"], "note":"my token", "client_id":"my_client_id", "client_secret":"my_client_secret"}'
70+
```
71+
72+
Then you must switch to the [web application flow](/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to generate access tokens.
73+
74+
{% endif %}

0 commit comments

Comments
 (0)