Skip to content

Commit

Permalink
Merge branch 'main' into patch-23
Browse files Browse the repository at this point in the history
  • Loading branch information
shati-patel authored Oct 14, 2020
2 parents 8114478 + 923c7e4 commit 9f6b798
Show file tree
Hide file tree
Showing 86 changed files with 595 additions and 569 deletions.
24 changes: 22 additions & 2 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@
"name": "Simran",
"avatar_url": "https://avatars3.githubusercontent.com/u/7819991?v=4",
"profile": "https://www.arangodb.com/",
"contributions": [
"doc"
]
},
{
Expand Down Expand Up @@ -356,8 +358,26 @@
"contributions": [
"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",
"avatar_url": "https://avatars3.githubusercontent.com/u/1529017?v=4",
"profile": "https://www.kewindousse.ch",
"contributions": [
"content"
]
},
{
"contributorsPerLine": 7,
"projectName": "docs",
"projectOwner": "github",
Expand Down
9 changes: 7 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
# https://help.github.com/articles/about-codeowners
# https://git-scm.com/docs/gitignore

/translations/ @github/docs-localization @github-actions
# Engineering
*.js @github/docs-engineering
/.github/ @github/docs-engineering
/script/ @github/docs-engineering
app.json @github/docs-engineering
crowdin.yml @github/docs-engineering
Dockerfile @github/docs-engineering
package-lock.json @github/docs-engineering
package.json @github/docs-engineering

# Localization
/.github/workflows/crowdin.yml @github/docs-localization
/crowdin*.yml @github/docs-engineering @github/docs-localization
/translations/ @github/docs-engineering @github/docs-localization @github-actions

# Site Policy
/content/github/site-policy/ @github/site-policy-admins

# Make sure that Octokit maintainers get notified about changes
Expand Down
12 changes: 5 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<!--
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT https://github.com/github/docs-content/issues/new/choose INSTEAD.
-->

<!--
Hello! Thanks for your interest in contributing to this project.
Thank you for contributing to this project! You must fill out the information below before we can review this pull request. By explaining why you're making a change (or linking to a pull request) and what changes you've made, we can triage your pull request to the best possible team for review.
Before opening a PR, please see our [CONTRIBUTING.md](https://github.com/github/docs/blob/main/CONTRIBUTING.md) for information how to contribute.
See our [CONTRIBUTING.md](/main/CONTRIBUTING.md) for information how to contribute.
For changes to content in [site policy](https://github.com/github/docs/tree/main/content/github/site-policy), see the [CONTRIBUTING guide in the site-policy repo](https://github.com/github/site-policy/blob/main/CONTRIBUTING.md).
Thanks again! :octocat:
We cannot accept changes to our translated content right now. See the [contributing.md](/main/CONTRIBUTING.md#earth_asia-translations) for more information.
Thanks again!
-->

### Why:
Expand Down
2 changes: 2 additions & 0 deletions .github/allowed-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ module.exports = [
'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',
'fkirc/skip-duplicate-actions@a12175f6209d4805b5a163d723270be2a0dc7b36',
'github/codeql-action/analyze@v1',
'github/codeql-action/init@v1',
'ianwalter/puppeteer@3.0.0',
Expand Down
32 changes: 27 additions & 5 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
# 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@v2
- name: Install

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

- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Test
uses: ianwalter/puppeteer@3.0.0
with:
args: npm run browser-test
args: npm run browser-test
52 changes: 52 additions & 0 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Please ping @github/docs-localization in the PR whenever you update this file!

name: Crowdin Sync

on:
workflow_dispatch:
push:
branches:
- main

jobs:
sync_with_crowdin:
name: Sync with Crowdin
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Sync
uses: crowdin/github-action@1.0.10
with:
upload_translations: false
download_translations: true
create_pull_request: true

# Using a custom config temporarily to avoid clobbering the existing crowdin.yml
# that is used by the github-help-docs OAuth integration.
config: 'crowdin-actions-config.yml'

# This is the name of the git branch that Crowdin will create when opening a pull request.
# This branch does NOT need to be manually created. It will be created automatically by the action.
localization_branch_name: automated-crowdin-translations

# This is the name of the top-level directory that Crowdin will use for files.
# Note that this is not a "branch" in the git sense, but more like a top-level directory in your Crowdin project.
# This branch does NOT need to be manually created. It will be created automatically by the action.
crowdin_branch_name: crowdin-main

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# 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
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}

# A personal access token, not to be confused with Crowdin API v1 "API key"
# See https://crowdin.com/settings#api-key to generate a token
# This token was created by logging into Crowdin with the octoglot user
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}


2 changes: 1 addition & 1 deletion .github/workflows/merged-notification.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
pull_request:
pull_request_target:
types: ['closed']

jobs:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pa11y.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
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
Expand Down
64 changes: 48 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name: Node.js Tests

on:
workflow_dispatch:
push:
branches:
- main
Expand All @@ -14,79 +15,110 @@ env:
CI: true

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_ignore: '[".all-contributorsrc", ".env.example", ".gitattributes", ".vscode/**", "app.json", "assets/**", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "contributing/**", "crowdin-actions-config.yml", "crowdin.yml", "docs", "javascripts/**", "jest-puppeteer.config.js", "LICENSE-CODE", "LICENSE", "nodemon.json", "ownership.yaml", "README.md", "script/**", "stylesheets/**"]'
lint:
needs: see_if_should_skip
runs-on: ubuntu-latest
steps:
- name: Check out repo
# 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: Check out repo
uses: actions/checkout@v2

- name: Setup node
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Setup node
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Get npm cache directory
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache node modules
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Cache node modules
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Install dependencies
run: npm ci

- name: Run linter
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Run linter
run: npx standard

- name: Check dependencies
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Check dependencies
run: npm run check-deps

test:
needs: see_if_should_skip
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test-group: [content, meta, rendering, routing, unit, links-and-images]
steps:
- name: Check out repo
# 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: Check out repo
uses: actions/checkout@v2

- name: Setup node
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Setup node
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Get npm cache directory
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache node modules
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Cache node modules
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Install dependencies
run: npm ci

- name: Run build script
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Run build script
run: npm run build

- name: Run tests
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Run tests
run: npx jest tests/${{ matrix.test-group }}/

- name: Send Slack notification if workflow fails
uses: rtCamp/action-slack-notify@master
if: failure() && github.ref == 'early-access'
env:
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
SLACK_MESSAGE: "Tests are failing on the `early-access` branch. https://github.com/github/docs-internal/tree/early-access"
SLACK_MESSAGE: "Tests are failing on the `early-access` branch. https://github.com/github/docs-internal/tree/early-access"
6 changes: 0 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ Now that you're a part of the GitHub Docs community, you can keep participating
- [Labels](#labels)
- [Opening a pull request](#opening-a-pull-request)
- [Working in the github/docs repository](#working-in-the-githubdocs-repository)
- [Resolving merge conflicts](#resolving-merge-conflicts)
- [In the GitHub user interface](#in-the-github-user-interface)
- [Editing the file and committing the changes](#editing-the-file-and-committing-the-changes)
- [Troubleshooting](#troubleshooting)
- [Failed status checks](#failed-status-checks)
- [Draft pull requests](#draft-pull-requests)
- [Reviewing](#reviewing)
- [Self review](#self-review)
- [Pull request template](#pull-request-template)
Expand Down
Loading

0 comments on commit 9f6b798

Please sign in to comment.