Merge branch 'main' into actions-versions-to-shas

This commit is contained in:
Chiedo John 2020-10-15 09:11:10 -04:00 коммит произвёл GitHub
Родитель 1ef8963d00 67b9fbc0da
Коммит ce8d1e6811
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
33 изменённых файлов: 187 добавлений и 46 удалений

2
.github/workflows/crowdin.yml поставляемый
Просмотреть файл

@ -38,7 +38,7 @@ jobs:
crowdin_branch_name: crowdin-main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.OCTOGLOT_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
# This is a numeric id, not to be confused with Crowdin API v1 "project identifier" string
# See "API v2" on https://crowdin.com/project/<your-project>/settings#api

79
.github/workflows/first-responder-docs-content.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,79 @@
name: First responder docs-content
on:
pull_request:
types: [reopened, opened, ready_for_review, unlabeled]
jobs:
first-responder-triage:
if: github.repository == 'github/docs-internal' && github.event.pull_request.draft == false && github.event.action != 'unlabeled'
runs-on: ubuntu-latest
steps:
- name: Check if the event originated from a team member
uses: actions/github-script@v2.0.0
id: set-result
with:
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
result-encoding: string
script: |
const repoName = context.payload.repository.name
const ownerName = context.payload.repository.owner.login
const issueNumber = (context.eventName === "issues") ? context.payload.issue.number : context.payload.number
const updatedIssueInformation = await github.issues.get({
owner: ownerName,
repo: repoName,
issue_number: issueNumber
})
const teamMembers = await github.request(
`/orgs/github/teams/docs/members`
)
const logins = teamMembers.data.map(member => member.login)
if (logins.some(login => login === updatedIssueInformation.data.user.login)) {
console.log(`This issue or pull request was authored by a member of the github/docs team.`)
return 'true'
}
console.log(`This issue or pull request was authored by an external contributor.`)
return 'false'
- name: Label external contributor pull requests with docs-content-fr
uses: rachmari/labeler@v1.0.4
if: steps.set-result.outputs.result == 'false'
with:
repo-token: "${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}"
add-labels: "docs-content-fr"
- name: Triage to FR PR project column
uses: rachmari/actions-add-new-issue-to-column@v1.1.1
if: steps.set-result.outputs.result == 'false'
with:
action-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
project-url: "https://github.com/orgs/github/projects/1367"
column-name: "Docs-internal external contributor PRs"
first-responder-label-removed:
if: github.event.label.name == 'docs-content-fr' && github.event.action == 'unlabeled'
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Remove card from project
uses: actions/github-script@v2.0.0
with:
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
result-encoding: string
script: |
const issueToRemove = context.payload.number
const cards = await github.projects.listCards({
column_id: 11130889
})
cards.data.forEach(card => {
if (card.content_url) {
const cardIssueNumber = parseInt(card.content_url.split('/').pop(), 10)
if (cardIssueNumber === issueToRemove) {
const cards = github.projects.deleteCard({
card_id: card.id
})
}
}
})

Двоичные данные
assets/images/help/images/overview-actions-result-updated.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 136 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 84 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 47 KiB

Двоичные данные
assets/images/help/repository/copy-link-button-updated.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 136 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 38 KiB

После

Ширина:  |  Высота:  |  Размер: 87 KiB

Двоичные данные
assets/images/help/repository/delete-all-logs-updated.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 124 KiB

Двоичные данные
assets/images/help/repository/download-logs-drop-down-updated.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 86 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 54 KiB

После

Ширина:  |  Высота:  |  Размер: 121 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 219 KiB

Двоичные данные
assets/images/help/repository/search-log-box-updated.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 67 KiB

Двоичные данные
assets/images/help/repository/search-log-box.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 49 KiB

После

Ширина:  |  Высота:  |  Размер: 111 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 274 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 98 KiB

Просмотреть файл

@ -36,7 +36,7 @@ Before you begin, you'll create a {% data variables.product.product_name %} repo
echo "Goodbye"
```
1. From your terminal, make `goodbye.sh` executable and check it into your repository.
3. From your terminal, make `goodbye.sh` executable.
```shell
chmod +x goodbye.sh
@ -85,14 +85,26 @@ Before you begin, you'll create a {% data variables.product.product_name %} repo
For more information about how to use `github.action_path`, see "[`github context`](/actions/reference/context-and-expression-syntax-for-github-actions#github-context)".
1. Create a new label. This example uses a label called `v1` for the main branch. For more information, see "[Creating a label
](/github/managing-your-work-on-github/creating-a-label)."
1. From your terminal, check in your `action.yml` file.
```shell
git add action.yml
git commit -m "Add action"
git push
```
1. From your terminal, add a tag. This example uses a tag called `v1`. For more information, see "[About actions](/actions/creating-actions/about-actions#using-release-management-for-actions)."
```shell
git tag -a -m "Description of this release" v1
git push --follow-tags
```
### Testing out your action in a workflow
The following workflow code uses the completed hello world action that you made in "[Creating an action metadata file](/actions/creating-actions/creating-a-composite-run-steps-action#creating-an-action-metadata-file)".
Copy the workflow code into a `.github/workflows/main.yml` file in another repository, but replace `actions/hello-world-composite-run-steps-action@v1` with the repository and label you created. You can also replace the `who-to-greet` input with your name.
Copy the workflow code into a `.github/workflows/main.yml` file in another repository, but replace `actions/hello-world-composite-run-steps-action@v1` with the repository and tag you created. You can also replace the `who-to-greet` input with your name.
{% raw %}
**.github/workflows/main.yml**

Просмотреть файл

@ -263,4 +263,8 @@ jobs:
From your repository, click the **Actions** tab, and select the latest workflow run. You should see "Hello Mona the Octocat" or the name you used for the `who-to-greet` input and the timestamp printed in the log.
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
![A screenshot of using your action in a workflow](/assets/images/help/repository/javascript-action-workflow-run-updated.png)
{% else %}
![A screenshot of using your action in a workflow](/assets/images/help/repository/javascript-action-workflow-run.png)
{% endif %}

Просмотреть файл

@ -213,8 +213,13 @@ Once your job has started running, you can view each step's activity on {% data
![Screenshot of workflow results](/assets/images/help/images/learn-github-actions-workflow.png)
1. Under "Workflow runs", click the name of the run you want to see.
![Screenshot of workflow runs](/assets/images/help/images/learn-github-actions-run.png)
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
1. Click on the job name to see the results of each step.
![Screenshot of workflow run details](/assets/images/help/images/overview-actions-result-updated.png)
{% else %}
1. Click on the job name to see the results of each step.
![Screenshot of workflow run details](/assets/images/help/images/overview-actions-result.png)
{% endif %}
### Next steps

Просмотреть файл

@ -14,8 +14,6 @@ You can see whether a workflow run is in progress or complete from the workflow
If the run is complete, you can see whether the result was a success, failure, canceled, or neutral. If the run failed, you can view and search the build logs to diagnose the failure and re-run the workflow. You can also view billable job execution minutes, or download logs and build artifacts.
![Annotated workflow run image](/assets/images/help/repository/annotated-workflow.png)
{% data variables.product.prodname_actions %} use the Checks API to output statuses, results, and logs for a workflow. {% data variables.product.prodname_dotcom %} creates a new check suite for each workflow run. The check suite contains a check run for each job in the workflow, and each job includes steps. {% data variables.product.prodname_actions %} are run as a step in a workflow. For more information about the Checks API, see "[Checks](/v3/checks/)."
{% data reusables.github-actions.invalid-workflow-files %}
@ -30,13 +28,11 @@ For jobs run on {% data variables.product.prodname_dotcom %}-hosted runners, "Se
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
{% data reusables.repositories.navigate-to-job %}
6. To expand the log for a failed step, click the step.
![Failed step name](/assets/images/help/repository/failed-check-step.png)
7. Optionally, to get a link to a specific line in the logs, click on the step's line number. You can copy the link from the address bar of your web browser.
![Button to copy link](/assets/images/help/repository/copy-link-button.png)
{% data reusables.repositories.navigate-to-workflow-superlinter %}
{% data reusables.repositories.view-run-superlinter %}
{% data reusables.repositories.navigate-to-job-superlinter %}
{% data reusables.repositories.view-failed-job-results-superlinter %}
{% data reusables.repositories.view-specific-line-superlinter %}
### Searching logs
@ -44,13 +40,18 @@ You can search the build logs for a particular step. When you search logs, only
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
{% data reusables.repositories.navigate-to-job %}
6. To expand each step you want to include in your search, click the step.
{% data reusables.repositories.navigate-to-workflow-superlinter %}
{% data reusables.repositories.view-run-superlinter %}
{% data reusables.repositories.navigate-to-job-superlinter %}
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
1. In the upper-right corner of the log output, in the **Search logs** search box, type a search query.
![Search box to search logs](/assets/images/help/repository/search-log-box-updated.png)
{% else %}
1. To expand each step you want to include in your search, click the step.
![Step name](/assets/images/help/repository/failed-check-step.png)
7. In the upper-right corner of the log output, in the **Search logs** search box, type a search query.
1. In the upper-right corner of the log output, in the **Search logs** search box, type a search query.
![Search box to search logs](/assets/images/help/repository/search-log-box.png)
{% endif %}
### Downloading logs
@ -58,12 +59,16 @@ You can download the log files from your workflow run. You can also download a w
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
1. In the left sidebar, select any job.
![Select a workflow job](/assets/images/help/repository/workflow-job.png)
2. In the upper right corner, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} and select **Download log archive**.
{% data reusables.repositories.navigate-to-workflow-superlinter %}
{% data reusables.repositories.view-run-superlinter %}
{% data reusables.repositories.navigate-to-job-superlinter %}
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
1. In the upper right corner, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} and select **Download log archive**.
![Download logs drop-down menu](/assets/images/help/repository/download-logs-drop-down-updated.png)
{% else %}
1. In the upper right corner, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} and select **Download log archive**.
![Download logs drop-down menu](/assets/images/help/repository/download-logs-drop-down.png)
{% endif %}
### Deleting logs
@ -71,10 +76,18 @@ You can delete the log files from your workflow run. {% data reusables.repositor
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
{% data reusables.repositories.navigate-to-workflow-superlinter %}
{% data reusables.repositories.view-run-superlinter %}
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
1. In the upper right corner, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}.
![Kebab-horizontal icon](/assets/images/help/repository/workflow-run-kebab-horizontal-icon-updated.png)
2. To delete the log files, click the **Delete all logs** button and review the confirmation prompt.
![Delete all logs](/assets/images/help/repository/delete-all-logs-updated.png)
After deleting logs, the **Delete all logs** button is removed to indicate that no log files remain in the workflow run.
{% else %}
1. In the upper right corner, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}.
![Kebab-horizontal icon](/assets/images/help/repository/workflow-run-kebab-horizontal-icon.png)
2. To delete the log files, click the **Delete all logs** button and review the confirmation prompt.
![Delete all logs](/assets/images/help/repository/delete-all-logs.png)
After deleting logs, the **Delete all logs** button is removed to indicate that no log files remain in the workflow run.
After the logs have been deleted, the **Delete all logs** button is removed to indicate that no log files remain in the workflow run.
{% endif %}

Просмотреть файл

@ -56,15 +56,13 @@ Committing the workflow file in your repository triggers the `push` event and ru
### Viewing your workflow results
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
1. In the left sidebar, click the workflow you want to see.
![Workflow list in left sidebar](/assets/images/help/repository/superlinter-workflow-sidebar.png)
1. From the list of workflow runs, click the name of the run you want to see.
![Name of workflow run](/assets/images/help/repository/superlinter-run-name.png)
{% data reusables.repositories.navigate-to-workflow-superlinter %}
{% data reusables.repositories.view-run-superlinter %}
1. In the left sidebar, click the **Lint code base** job.
![Lint code base job](/assets/images/help/repository/superlinter-lint-code-base-job.png)
2. Expand the **Run Super-Linter** step to view the results.
![Super linter workflow results](/assets/images/help/repository/super-linter-workflow-results.png)
{% data reusables.repositories.view-failed-job-results-superlinter %}
### More starter workflows

Просмотреть файл

@ -44,7 +44,7 @@ You cannot create a default license file. License files must be added to individ
![Owner drop-down menu](/assets/images/help/repository/create-repository-owner.png)
3. Type **.github** as the name for your repository, and an optional description.
![Create repository field](/assets/images/help/repository/default-file-repository-name.png)
4. Choose to make the repository public.
4. Make sure the repository status is set to **Public** (a repository for default files cannot be private).
![Radio buttons to select private or public status](/assets/images/help/repository/create-repository-public-private.png)
{% data reusables.repositories.initialize-with-readme %}
{% data reusables.repositories.create-repo %}

Просмотреть файл

@ -78,7 +78,8 @@ docs/* docs@example.com
apps/ @octocat
# In this example, @doctocat owns any file in the `/docs`
# directory in the root of your repository.
# directory in the root of your repository and any of its
# subdirectories.
/docs/ @doctocat
```

Просмотреть файл

@ -11,9 +11,15 @@ versions:
enterprise-server: '*'
---
{% note %}
**Note:** The special keywords in a pull request description are interpreted when the pull request targets the repository's *default* branch. However, if the PR's base is *any other branch*, then these keywords are ignored, no links are created and merging the PR has no effect on the issues. **If you want to link a pull request to an issue using a keyword, the PR must be on the default branch.**
{% endnote %}
### About linked issues and pull requests
You can link an issue to a pull request {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.20" %}manually or {% endif %}using a supported keyword in the pull request description.
You can link an issue to a pull request {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.20" %}manually or {% endif %}using a supported keyword in the pull request description.
When you link a pull request to the issue the pull request addresses, collaborators can see that someone is working on the issue. {% if currentVersion ver_lt "enterprise-server@2.21" %}If the pull request and the issue are in different repositories, {% data variables.product.product_name %} will display the link after the pull request is merged, if the person who merges the pull request also has permission to close the issue.{% endif %}
@ -37,7 +43,7 @@ You can manually link up to ten issues to each pull request. The issue and pull
### Linking a pull request to an issue using a keyword
You can link a pull request to an issue by using a supported keyword in the pull request's description.
You can link a pull request to an issue by using a supported keyword in the pull request's description or in a commit message (please note that the pull request must be on the default branch).
* close
* closes

Просмотреть файл

@ -18,9 +18,9 @@ The Actions workflow usually takes about five minutes, and the progress can be v
## Development
In cases where a publicity event like GitHub Satellite or GitHub Universe demands a very tight shipping window, it is also possible to manually sync the indices with Algolia's servers from your local checkout of the repo, before your feature branch is merged to main. Manually syncing the indices can also be useful to test an unreleased GitHub Enterprise version or a translated language (Portugese, Chinese, etc) that is not yet in production.
In cases where a publicity event like GitHub Satellite or GitHub Universe demands a very tight shipping window, it is also possible to manually sync the indices with Algolia's servers from your local checkout of the repo, before your feature branch is merged to main. Manually syncing the indices can also be useful to test an unreleased GitHub Enterprise version or a translated language (Portuguese, Chinese, etc) that is not yet in production.
To sync the indices from your development enviroment:
To sync the indices from your development environment:
1. Make sure the two required environment variables `ALGOLIA_APPLICATION_ID` and `ALGOLIA_API_KEY` are set in your `.env` file. These can be retrieved from the [Algolia site](https://www.algolia.com/apps/ZI5KPY1HBE/api-keys/all).
2. Run `npm run sync-search-dry-run`. This takes a while to complete. It will prepare, test, and validate all the indices without actually uploading anything to Algolia's servers.

Просмотреть файл

@ -0,0 +1,7 @@
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
1. In the left sidebar, click the job you want to see.
![Lint code base job](/assets/images/help/repository/superlinter-lint-code-base-job.png)
{% else %}
1. In the left sidebar, click the job you want to see.
![Select a workflow job](/assets/images/help/repository/workflow-job.png)
{% endif %}

Просмотреть файл

@ -1,2 +0,0 @@
1. In the left sidebar, click the job you want to see.
![List of jobs in left sidebar](/assets/images/help/repository/check-suite-list.png)

Просмотреть файл

@ -0,0 +1,2 @@
1. In the left sidebar, click the workflow you want to see.
![Workflow list in left sidebar](/assets/images/help/repository/superlinter-workflow-sidebar.png)

Просмотреть файл

@ -0,0 +1,7 @@
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
1. Any failed steps are automatically expanded to display the results.
![Super linter workflow results](/assets/images/help/repository/super-linter-workflow-results-updated.png)
{% else %}
1. Expand the **Run Super-Linter** step to view the results.
![Super linter workflow results](/assets/images/help/repository/super-linter-workflow-results.png)
{% endif %}

Просмотреть файл

@ -0,0 +1,2 @@
1. From the list of workflow runs, click the name of the run you want to see.
![Name of workflow run](/assets/images/help/repository/superlinter-run-name.png)

Просмотреть файл

@ -0,0 +1,7 @@
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
1. Optionally, to get a link to a specific line in the logs, click on the step's line number. You can then copy the link from the address bar of your web browser.
![Button to copy link](/assets/images/help/repository/copy-link-button-updated.png)
{% else %}
1. Optionally, to get a link to a specific line in the logs, click on the step's line number. You can then copy the link from the address bar of your web browser.
![Button to copy link](/assets/images/help/repository/copy-link-button.png)
{% endif %}

6
package-lock.json сгенерированный
Просмотреть файл

@ -1144,9 +1144,9 @@
}
},
"@github/rest-api-operations": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@github/rest-api-operations/-/rest-api-operations-3.1.0.tgz",
"integrity": "sha512-RszMVxIbGvey7pS1wUZ7yULUGH2SFQFYodsAv5X0oubWoJQSlmw1RGoyc8b2YeD/VD4Ljjrq73y3bhu+6eVOlg=="
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@github/rest-api-operations/-/rest-api-operations-3.1.1.tgz",
"integrity": "sha512-TrF+HIai+4RZq52faEEg92sstNk89VZNCcFUhPZ7sLnlrsEMuKu1Ls7lDDHKj2GgyiiMoL1iHADgzJBosfNnug=="
},
"@hapi/address": {
"version": "2.1.4",

Просмотреть файл

@ -16,7 +16,7 @@
"@github-docs/data-directory": "^1.2.0",
"@github-docs/frontmatter": "^1.3.1",
"@github-docs/render-content": "^5.0.0",
"@github/rest-api-operations": "^3.1.0",
"@github/rest-api-operations": "^3.1.1",
"@octokit/rest": "^16.38.1",
"@primer/css": "^15.1.0",
"@primer/octicons": "^11.0.0",

Просмотреть файл

@ -48,7 +48,7 @@ if [[ $OPTION == "stitch" ]]; then
# Generate the deferenced OpenAPI files from github/github
cd github
bin/dump-openapi-description /tmp/dump
bin/openapi bundle /tmp/dump
# Copy the derefrenced json files into rest-api-operations and build them
cd ../rest-api-operations