Skip to content

Commit 3a9ecc2

Browse files
authored
Merge branch 'main' into patch-1
2 parents 5c7caf0 + b304d28 commit 3a9ecc2

File tree

125 files changed

+795
-589
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+795
-589
lines changed

.all-contributorsrc

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@
328328
"name": "Simran",
329329
"avatar_url": "https://avatars3.githubusercontent.com/u/7819991?v=4",
330330
"profile": "https://www.arangodb.com/",
331+
"contributions": [
332+
"doc"
331333
]
332334
},
333335
{
@@ -347,8 +349,35 @@
347349
"contributions": [
348350
"doc"
349351
]
350-
}
351-
],
352+
},
353+
{
354+
"login": "chiedo",
355+
"name": "Chiedo John",
356+
"avatar_url": "https://avatars2.githubusercontent.com/u/2156688?v=4",
357+
"profile": "https://chiedojohn.com/",
358+
"contributions": [
359+
"code"
360+
]
361+
},
362+
{
363+
"login": "paulyhedral",
364+
"name": "Paul Schifferer",
365+
"avatar_url": "https://avatars1.githubusercontent.com/u/419457?v=4",
366+
"profile": "https://wanderingmonster.org",
367+
"contributions": [
368+
"content"
369+
]
370+
},
371+
{
372+
"login": "Protectator",
373+
"name": "Kewin Dousse",
374+
"avatar_url": "https://avatars3.githubusercontent.com/u/1529017?v=4",
375+
"profile": "https://www.kewindousse.ch",
376+
"contributions": [
377+
"content"
378+
]
379+
},
380+
{
352381
"contributorsPerLine": 7,
353382
"projectName": "docs",
354383
"projectOwner": "github",

.github/CODEOWNERS

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,23 @@
33
# https://help.github.com/articles/about-codeowners
44
# https://git-scm.com/docs/gitignore
55

6-
/translations/ @github/docs-localization @github-actions
6+
# Engineering
77
*.js @github/docs-engineering
88
/.github/ @github/docs-engineering
99
/script/ @github/docs-engineering
1010
app.json @github/docs-engineering
11-
crowdin.yml @github/docs-engineering
1211
Dockerfile @github/docs-engineering
1312
package-lock.json @github/docs-engineering
1413
package.json @github/docs-engineering
1514

15+
# Localization
16+
/.github/workflows/crowdin.yml @github/docs-localization
17+
/crowdin*.yml @github/docs-engineering @github/docs-localization
18+
/translations/ @github/docs-engineering @github/docs-localization @github-actions
19+
20+
# Site Policy
1621
/content/github/site-policy/ @github/site-policy-admins
22+
23+
# Make sure that Octokit maintainers get notified about changes
24+
# relevant to the Octokit libraries (https://github.com/octokit)
25+
/content/rest/reference @github/octokit-maintainers

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<!--
2-
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.
3-
-->
4-
5-
<!--
6-
Hello! Thanks for your interest in contributing to this project.
2+
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.
73
8-
Before opening a PR, please see our [CONTRIBUTING.md](https://github.com/github/docs/blob/main/CONTRIBUTING.md) for information how to contribute.
4+
See our [CONTRIBUTING.md](/main/CONTRIBUTING.md) for information how to contribute.
95
106
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).
117
12-
Thanks again! :octocat:
8+
We cannot accept changes to our translated content right now. See the [contributing.md](/main/CONTRIBUTING.md#earth_asia-translations) for more information.
9+
10+
Thanks again!
1311
-->
1412

1513
### Why:

.github/allowed-actions.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ module.exports = [
1515
'actions/setup-node@v1',
1616
'actions/setup-ruby@v1',
1717
'actions/stale@v3',
18+
'crowdin/[email protected]',
1819
'dawidd6/action-delete-branch@v3',
1920
'docker://chinthakagodawita/autoupdate-action:v1',
21+
'fkirc/skip-duplicate-actions@a12175f6209d4805b5a163d723270be2a0dc7b36',
2022
'github/codeql-action/analyze@v1',
2123
'github/codeql-action/init@v1',
2224
'ianwalter/[email protected]',

.github/workflows/browser-test.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,40 @@
11
name: Browser Tests
22

3-
on: [push]
3+
on:
4+
workflow_dispatch:
5+
push:
46

57
jobs:
8+
see_if_should_skip:
9+
runs-on: ubuntu-latest
10+
# Map a step output to a job output
11+
outputs:
12+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
13+
steps:
14+
- id: skip_check
15+
uses: fkirc/skip-duplicate-actions@a12175f6209d4805b5a163d723270be2a0dc7b36
16+
with:
17+
cancel_others: 'false'
18+
github_token: ${{ github.token }}
19+
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"]'
620
build:
21+
needs: see_if_should_skip
722
runs-on: ubuntu-latest
823
steps:
9-
- name: Checkout
24+
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
25+
# Even if if doesn't do anything
26+
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
27+
name: Checkout
1028
uses: actions/checkout@v2
11-
- name: Install
29+
30+
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
31+
name: Install
1232
uses: ianwalter/[email protected]
1333
with:
1434
args: npm ci
15-
- name: Test
35+
36+
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
37+
name: Test
1638
uses: ianwalter/[email protected]
1739
with:
18-
args: npm run browser-test
40+
args: npm run browser-test

.github/workflows/crowdin.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Please ping @github/docs-localization in the PR whenever you update this file!
2+
3+
name: Crowdin Sync
4+
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
sync_with_crowdin:
13+
name: Sync with Crowdin
14+
if: github.repository == 'github/docs-internal'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Sync
21+
uses: crowdin/[email protected]
22+
with:
23+
upload_translations: false
24+
download_translations: true
25+
create_pull_request: true
26+
27+
# Using a custom config temporarily to avoid clobbering the existing crowdin.yml
28+
# that is used by the github-help-docs OAuth integration.
29+
config: 'crowdin-actions-config.yml'
30+
31+
# This is the name of the git branch that Crowdin will create when opening a pull request.
32+
# This branch does NOT need to be manually created. It will be created automatically by the action.
33+
localization_branch_name: automated-crowdin-translations
34+
35+
# This is the name of the top-level directory that Crowdin will use for files.
36+
# Note that this is not a "branch" in the git sense, but more like a top-level directory in your Crowdin project.
37+
# This branch does NOT need to be manually created. It will be created automatically by the action.
38+
crowdin_branch_name: crowdin-main
39+
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.OCTOGLOT_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
42+
43+
# This is a numeric id, not to be confused with Crowdin API v1 "project identifier" string
44+
# See "API v2" on https://crowdin.com/project/<your-project>/settings#api
45+
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
46+
47+
# A personal access token, not to be confused with Crowdin API v1 "API key"
48+
# See https://crowdin.com/settings#api-key to generate a token
49+
# This token was created by logging into Crowdin with the octoglot user
50+
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
51+
52+
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: First responder docs-content
2+
on:
3+
pull_request:
4+
types: [reopened, opened, ready_for_review, unlabeled]
5+
6+
jobs:
7+
first-responder-triage:
8+
if: github.repository == 'github/docs-internal' && github.event.pull_request.draft == false && github.event.action != 'unlabeled'
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Check if the event originated from a team member
13+
uses: actions/[email protected]
14+
id: set-result
15+
with:
16+
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
17+
result-encoding: string
18+
script: |
19+
const repoName = context.payload.repository.name
20+
const ownerName = context.payload.repository.owner.login
21+
const issueNumber = (context.eventName === "issues") ? context.payload.issue.number : context.payload.number
22+
const updatedIssueInformation = await github.issues.get({
23+
owner: ownerName,
24+
repo: repoName,
25+
issue_number: issueNumber
26+
})
27+
const teamMembers = await github.request(
28+
`/orgs/github/teams/docs/members`
29+
)
30+
const logins = teamMembers.data.map(member => member.login)
31+
if (logins.some(login => login === updatedIssueInformation.data.user.login)) {
32+
console.log(`This issue or pull request was authored by a member of the github/docs team.`)
33+
return 'true'
34+
}
35+
console.log(`This issue or pull request was authored by an external contributor.`)
36+
return 'false'
37+
- name: Label external contributor pull requests with docs-content-fr
38+
uses: rachmari/[email protected]
39+
if: steps.set-result.outputs.result == 'false'
40+
with:
41+
repo-token: "${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}"
42+
add-labels: "docs-content-fr"
43+
- name: Triage to FR PR project column
44+
uses: rachmari/[email protected]
45+
if: steps.set-result.outputs.result == 'false'
46+
with:
47+
action-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
48+
project-url: "https://github.com/orgs/github/projects/1367"
49+
column-name: "Docs-internal external contributor PRs"
50+
51+
first-responder-label-removed:
52+
if: github.event.label.name == 'docs-content-fr' && github.event.action == 'unlabeled'
53+
runs-on: ubuntu-latest
54+
55+
steps:
56+
- name: Dump GitHub context
57+
env:
58+
GITHUB_CONTEXT: ${{ toJson(github) }}
59+
run: echo "$GITHUB_CONTEXT"
60+
- name: Remove card from project
61+
uses: actions/[email protected]
62+
with:
63+
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
64+
result-encoding: string
65+
script: |
66+
const issueToRemove = context.payload.number
67+
const cards = await github.projects.listCards({
68+
column_id: 11130889
69+
})
70+
cards.data.forEach(card => {
71+
if (card.content_url) {
72+
const cardIssueNumber = parseInt(card.content_url.split('/').pop(), 10)
73+
if (cardIssueNumber === issueToRemove) {
74+
const cards = github.projects.deleteCard({
75+
card_id: card.id
76+
})
77+
}
78+
}
79+
})

.github/workflows/merged-notification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
on:
2-
pull_request:
2+
pull_request_target:
33
types: ['closed']
44

55
jobs:

.github/workflows/pa11y.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: "Pa11y"
2-
on: [push]
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: "25 17 * * *" # once a day at 17:25 UTC / 11:50 PST
36
jobs:
47
test:
58
runs-on: ubuntu-latest

.github/workflows/start-new-engineering-pr-workflow.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
steps:
1515
- name:
1616
uses: actions/github-script@v2
17+
continue-on-error: true
1718
with:
1819
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
1920
script: |

0 commit comments

Comments
 (0)