Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
felicitymay authored Oct 15, 2020
2 parents 5c7caf0 + b304d28 commit 3a9ecc2
Showing 125 changed files with 795 additions and 589 deletions.
33 changes: 31 additions & 2 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -328,6 +328,8 @@
"name": "Simran",
"avatar_url": "https://avatars3.githubusercontent.com/u/7819991?v=4",
"profile": "https://www.arangodb.com/",
"contributions": [
"doc"
]
},
{
@@ -347,8 +349,35 @@
"contributions": [
"doc"
]
}
],
},
{
"login": "chiedo",
"name": "Chiedo John",
"avatar_url": "https://avatars2.githubusercontent.com/u/2156688?v=4",
"profile": "https://chiedojohn.com/",
"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",
13 changes: 11 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -3,14 +3,23 @@
# 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
# relevant to the Octokit libraries (https://github.com/octokit)
/content/rest/reference @github/octokit-maintainers
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:
2 changes: 2 additions & 0 deletions .github/allowed-actions.js
Original file line number Diff line number Diff line change
@@ -15,8 +15,10 @@ module.exports = [
'actions/setup-node@v1',
'actions/setup-ruby@v1',
'actions/stale@v3',
'crowdin/[email protected]',
'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/[email protected]',
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/[email protected]
with:
args: npm ci
- name: Test

- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
name: Test
uses: ianwalter/[email protected]
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/[email protected]
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.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
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 }}


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
})
}
}
})
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:
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
1 change: 1 addition & 0 deletions .github/workflows/start-new-engineering-pr-workflow.yml
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ jobs:
steps:
- name:
uses: actions/github-script@v2
continue-on-error: true
with:
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
script: |
2 changes: 1 addition & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
name: Node.js Tests - Windows

on:
workflow_dispatch:
schedule:
- cron: "50 19 * * *" # once a day at 19:50 UTC / 11:50 PST

@@ -44,7 +45,6 @@ jobs:
run: npm run check-deps

test:
if: github.repository == 'github/docs-internal'
runs-on: windows-latest
strategy:
fail-fast: false
Loading

0 comments on commit 3a9ecc2

Please sign in to comment.