1
0
mirror of synced 2026-01-02 03:04:13 -05:00

Merge pull request #9880 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot
2021-09-07 13:43:15 -04:00
committed by GitHub
3 changed files with 30 additions and 19 deletions

View File

@@ -16,6 +16,7 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
FIRST_RESPONDER_PROJECT: Docs content first responder
REPORT_AUTHOR: docubot
REPORT_LABEL: broken link report
REPORT_REPOSITORY: github/docs-content
@@ -80,19 +81,6 @@ jobs:
gh issue comment ${{ env.NEW_REPORT_URL }} --body "⬅️ [Previous report]($previous_report_url)"
# Link to the newer report from any older report that is still open,
# then close the older report.
for issue_url in $(gh list-reports \
--search 'no:assignee' \
--json url \
--jq '.[].url'); do
if [ "$issue_url" != "${{ env.NEW_REPORT_URL }}" ]; then
gh issue comment $issue_url --body "➡️ [Newer report](${{ env.NEW_REPORT_URL }})"
gh issue close $issue_url
fi
done
# If an old report is open and assigned to someone, link to the newer
# report without closing the old report.
@@ -103,3 +91,18 @@ jobs:
gh issue comment $issue_url --body "➡️ [Newer report](${{ env.NEW_REPORT_URL }})"
fi
done
# Link to the newer report from any older report that is still open,
# then close the older report and remove it from the first responder's
# project board.
for issue_url in $(gh list-reports \
--search 'no:assignee' \
--json url \
--jq '.[].url'); do
if [ "$issue_url" != "${{ env.NEW_REPORT_URL }}" ]; then
gh issue comment $issue_url --body "➡️ [Newer report](${{ env.NEW_REPORT_URL }})"
gh issue close $issue_url
gh issue edit $issue_url --remove-project "${{ env.FIRST_RESPONDER_PROJECT }}"
fi
done

View File

@@ -24,8 +24,12 @@ When your GitHub App acts on behalf of a user, it performs user-to-server reques
To authorize users for standard apps that run in the browser, use the [web application flow](#web-application-flow).
{% ifversion fpt or ghae or ghes > 3.0 %}
To authorize users for headless apps without direct access to the browser, such as CLI tools or Git credential managers, use the [device flow](#device-flow). The device flow uses the OAuth 2.0 [Device Authorization Grant](https://tools.ietf.org/html/rfc8628).
{% endif %}
## Web application flow
Using the web application flow, the process to identify users on your site is:
@@ -112,20 +116,22 @@ For example, in curl you can set the Authorization header like this:
curl -H "Authorization: token OAUTH-TOKEN" {% data variables.product.api_url_pre %}/user
```
{% ifversion fpt or ghae or ghes > 3.0 %}
## Device flow
{% ifversion ghes < 3.1 %}
{% note %}
**Note:** The device flow is in public beta and subject to change.
{% endnote %}
{% endif %}
The device flow allows you to authorize users for a headless app, such as a CLI tool or Git credential manager.
For more information about authorizing users using the device flow, see "[Authorizing OAuth Apps](/developers/apps/authorizing-oauth-apps#device-flow)".
{% endif %}
## Check which installation's resources a user can access

View File

@@ -22,8 +22,8 @@ If you want to skip authorizing your app in the standard way, such as when testi
To authorize your OAuth app, consider which authorization flow best fits your app.
- [web application flow](#web-application-flow): Used to authorize users for standard OAuth apps that run in the browser. (The [implicit grant type](https://tools.ietf.org/html/rfc6749#section-4.2) is not supported.)
- [device flow](#device-flow): Used for headless apps, such as CLI tools.
- [web application flow](#web-application-flow): Used to authorize users for standard OAuth apps that run in the browser. (The [implicit grant type](https://tools.ietf.org/html/rfc6749#section-4.2) is not supported.){% ifversion fpt or ghae or ghes > 3.0 %}
- [device flow](#device-flow): Used for headless apps, such as CLI tools.{% endif %}
## Web application flow
@@ -105,15 +105,15 @@ For example, in curl you can set the Authorization header like this:
curl -H "Authorization: token OAUTH-TOKEN" {% data variables.product.api_url_pre %}/user
```
{% ifversion fpt or ghae or ghes > 3.0 %}
## Device flow
{% ifversion ghes < 3.1 %}
{% note %}
**Note:** The device flow is in public beta and subject to change.
{% endnote %}
{% endif %}
The device flow allows you to authorize users for a headless app, such as a CLI tool or Git credential manager.
@@ -224,6 +224,8 @@ If you make more than one access token request (`POST {% data variables.product.
For more information, see the "[OAuth 2.0 Device Authorization Grant](https://tools.ietf.org/html/rfc8628#section-3.5)."
{% endif %}
## Non-Web application flow
Non-web authentication is available for limited situations like testing. If you need to, you can use [Basic Authentication](/rest/overview/other-authentication-methods#basic-authentication) to create a personal access token using your [Personal access tokens settings page](/articles/creating-an-access-token-for-command-line-use). This technique enables the user to revoke access at any time.