Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
runleonarun authored Oct 15, 2020
2 parents 022de56 + 9929a7b commit 7ef0906
Show file tree
Hide file tree
Showing 78 changed files with 445 additions and 200 deletions.
13 changes: 11 additions & 2 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,15 @@
"code"
]
},
{
"login": "paulyhedral",
"name": "Paul Schifferer",
"avatar_url": "https://avatars1.githubusercontent.com/u/419457?v=4",
"profile": "https://wanderingmonster.org",
"contributions": [
"content"
]
},
{
"login": "Protectator",
"name": "Kewin Dousse",
Expand All @@ -367,8 +376,8 @@
"contributions": [
"content"
]
}
],
},
{
"contributorsPerLine": 7,
"projectName": "docs",
"projectOwner": "github",
Expand Down
52 changes: 26 additions & 26 deletions .github/allowed-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@
// can be added it this list.

module.exports = [
'actions/cache@v1',
'actions/cache@v2',
'actions/checkout@v2',
'actions/github-script@0.9.0',
'actions/github-script@v2.0.0',
'actions/github-script@v2',
'actions/github-script@v3',
'actions/labeler@v2',
'actions/setup-node@v1',
'actions/setup-ruby@v1',
'actions/stale@v3',
'crowdin/github-action@1.0.10',
'dawidd6/action-delete-branch@v3',
'docker://chinthakagodawita/autoupdate-action:v1',
'actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe',
'actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16',
'actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675',
'actions/github-script@5d03ada4b0a753e9460b312e61cc4f8fdeacf163',
'actions/github-script@6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45',
'actions/github-script@44b873bc975058192f5279ebe7579496381f575d',
'actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9',
'actions/labeler@5f867a63be70efff62b767459b009290364495eb',
'actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d',
'actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526',
'actions/stale@44f9eae0adddf72dbf3eedfacc999f70afcec1a8',
'crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688',
'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911',
'docker://chinthakagodawita/autoupdate-action:4d72a15b5989091e07d6f4ce4cd3afb7b835ad1e68190937df778b702a547cdc',
'fkirc/skip-duplicate-actions@a12175f6209d4805b5a163d723270be2a0dc7b36',
'github/codeql-action/analyze@v1',
'github/codeql-action/init@v1',
'ianwalter/puppeteer@3.0.0',
'juliangruber/approve-pull-request-action@v1',
'juliangruber/find-pull-request-action@v1',
'juliangruber/read-file-action@v1',
'ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb',
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
'juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b',
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
'pascalgn/automerge-action@c9bd182',
'peter-evans/create-issue-from-file@v2',
'peter-evans/create-pull-request@v2',
'rachmari/actions-add-new-issue-to-column@v1.1.1',
'rachmari/labeler@v1.0.4',
'repo-sync/github-sync@v2',
'repo-sync/pull-request@v2',
'rtCamp/action-slack-notify@master',
'rtCamp/action-slack-notify@v2.1.0',
'peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5',
'peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8',
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
'repo-sync/pull-request@ea6773388b83b337e4da9a223293309f2c3670e7',
'rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815',
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0'
]
2 changes: 1 addition & 1 deletion .github/workflows/60-days-stale-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@44f9eae0adddf72dbf3eedfacc999f70afcec1a8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity.'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-label-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v2
- uses: actions/labeler@5f867a63be70efff62b767459b009290364495eb
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 2 additions & 2 deletions .github/workflows/autoupdate-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
name: autoupdate
runs-on: ubuntu-18.04
steps:
- uses: docker://chinthakagodawita/autoupdate-action:v1
- uses: docker://chinthakagodawita/autoupdate-action:4d72a15b5989091e07d6f4ce4cd3afb7b835ad1e68190937df778b702a547cdc
env:
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
PR_FILTER: labelled
PR_LABELS: autoupdate
MERGE_MSG: "Branch was updated using the 'autoupdate branch' Actions workflow."
MERGE_MSG: "Branch was updated using the 'autoupdate branch' Actions workflow."
38 changes: 30 additions & 8 deletions .github/workflows/browser-test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,40 @@
name: Browser Tests

on: [push]
on:
workflow_dispatch:
push:

jobs:
see_if_should_skip:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@a12175f6209d4805b5a163d723270be2a0dc7b36
with:
cancel_others: 'false'
github_token: ${{ github.token }}
paths: '["assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]'
build:
needs: see_if_should_skip
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install
uses: ianwalter/puppeteer@3.0.0
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
# Even if if doesn't do anything
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Checkout
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675

- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Install
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
with:
args: npm ci
- name: Test
uses: ianwalter/puppeteer@3.0.0

- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Test
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
with:
args: npm run browser-test
args: npm run browser-test
4 changes: 2 additions & 2 deletions .github/workflows/check-all-english-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
- name: npm ci
run: npm ci
- name: npm run build
Expand All @@ -28,7 +28,7 @@ jobs:
fi
- if: ${{ steps.check.outputs.continue == 'yes' }}
name: Create issue from file
uses: peter-evans/create-issue-from-file@v2
uses: peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5
with:
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
title: ${{ steps.check.outputs.title }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
- uses: github/codeql-action/init@v1
with:
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp} (not YET ruby, sorry!)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675

- name: Sync
uses: crowdin/github-action@1.0.10
uses: crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688
with:
upload_translations: false
download_translations: true
Expand All @@ -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/github-script@44b873bc975058192f5279ebe7579496381f575d
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@832d42ec5523f3c6d46e8168de71cd54363e3e2e
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@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
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@44b873bc975058192f5279ebe7579496381f575d
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
})
}
}
})
2 changes: 1 addition & 1 deletion .github/workflows/merged-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
if: github.event.repository.private == false && github.event.pull_request.merged && github.event.pull_request.base.ref == github.event.repository.default_branch
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
with:
script: |
github.issues.createComment({
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/pa11y.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
name: "Pa11y"
on: [push]
on:
workflow_dispatch:
schedule:
- cron: "25 17 * * *" # once a day at 17:25 UTC / 11:50 PST
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ping-staging-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
env:
HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
- name: npm ci
run: npm ci
- name: npm run build
run: npm run build
- name: Run script
run: script/ping-staging-apps.js
run: script/ping-staging-apps.js
8 changes: 4 additions & 4 deletions .github/workflows/remove-unused-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
echo 'The repo is currently frozen! Exiting this workflow.'
exit 1 # prevents further steps from running
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
- name: npm ci
run: npm ci
- name: Run scripts
Expand All @@ -28,13 +28,13 @@ jobs:
script/remove-extraneous-translation-files.js
- name: Get script results to use in PR body
id: results
uses: juliangruber/read-file-action@v1
uses: juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512
with:
path: ./results.md
- name: Remove script results file
run: rm -rf ./results.md
- name: Create pull request
uses: peter-evans/create-pull-request@v2
uses: peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8
with:
# need to use a token with repo and workflow scopes for this step
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
Expand All @@ -49,7 +49,7 @@ jobs:
branch: remove-unused-assets
- if: ${{ failure() }}
name: Delete remote branch (if previous steps failed)
uses: dawidd6/action-delete-branch@v3
uses: dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branches: remove-unused-assets
Loading

0 comments on commit 7ef0906

Please sign in to comment.