Skip to content

Commit

Permalink
Merge branch 'main' into actions-versions-to-shas
Browse files Browse the repository at this point in the history
  • Loading branch information
chiedo authored Oct 15, 2020
2 parents 1ef8963 + 67b9fbc commit ce8d1e6
Show file tree
Hide file tree
Showing 33 changed files with 187 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/first-responder-docs-content.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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
})
}
}
})
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/help/repository/annotated-workflow.png
Binary file not shown.
Binary file removed assets/images/help/repository/check-suite-list.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/repository/copy-link-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/repository/failed-check-step.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/repository/search-log-box.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]" %}
![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 %}
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]" %}
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
Expand Down
57 changes: 35 additions & 22 deletions content/actions/managing-workflow-runs/using-workflow-run-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -30,51 +28,66 @@ 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

You can search the build logs for a particular step. When you search logs, only expanded steps are included in the results. {% data reusables.repositories.permissions-statement-read %}

{% 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 "[email protected]" %}
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

You can download the log files from your workflow run. You can also download a workflow's artifacts. For more information, see "[Persisting workflow data using artifacts](/actions/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts)." {% data reusables.repositories.permissions-statement-read %}

{% 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 "[email protected]" %}
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

You can delete the log files from your workflow run. {% data reusables.repositories.permissions-statement-write %}

{% 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 "[email protected]" %}
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 %}
10 changes: 4 additions & 6 deletions content/actions/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ docs/* [email protected]
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
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]" %}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 "[email protected]" %}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 "[email protected]" %}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 %}

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions contributing/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 7 additions & 0 deletions data/reusables/repositories/navigate-to-job-superlinter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "[email protected]" %}
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 %}
2 changes: 0 additions & 2 deletions data/reusables/repositories/navigate-to-job.md

This file was deleted.

Loading

0 comments on commit ce8d1e6

Please sign in to comment.