Skip to content

Commit a4cc127

Browse files
authored
Merge branch 'main' into patch-6
2 parents a07dbfd + ac02c8e commit a4cc127

File tree

77 files changed

+434
-199
lines changed

Some content is hidden

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

77 files changed

+434
-199
lines changed

.github/allowed-actions.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,34 @@
44
// can be added it this list.
55

66
module.exports = [
7-
'actions/cache@v1',
8-
'actions/cache@v2',
9-
'actions/checkout@v2',
10-
'actions/[email protected]',
11-
'actions/[email protected]',
12-
'actions/github-script@v2',
13-
'actions/github-script@v3',
14-
'actions/labeler@v2',
15-
'actions/setup-node@v1',
16-
'actions/setup-ruby@v1',
17-
'actions/stale@v3',
18-
'crowdin/[email protected]',
19-
'dawidd6/action-delete-branch@v3',
20-
'docker://chinthakagodawita/autoupdate-action:v1',
7+
'actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe',
8+
'actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16',
9+
'actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675',
10+
'actions/github-script@5d03ada4b0a753e9460b312e61cc4f8fdeacf163',
11+
'actions/github-script@6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45',
12+
'actions/github-script@44b873bc975058192f5279ebe7579496381f575d',
13+
'actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9',
14+
'actions/labeler@5f867a63be70efff62b767459b009290364495eb',
15+
'actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d',
16+
'actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526',
17+
'actions/stale@44f9eae0adddf72dbf3eedfacc999f70afcec1a8',
18+
'crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688',
19+
'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911',
20+
'docker://chinthakagodawita/autoupdate-action:4d72a15b5989091e07d6f4ce4cd3afb7b835ad1e68190937df778b702a547cdc',
21+
'fkirc/skip-duplicate-actions@a12175f6209d4805b5a163d723270be2a0dc7b36',
2122
'github/codeql-action/analyze@v1',
2223
'github/codeql-action/init@v1',
23-
'ianwalter/puppeteer@3.0.0',
24-
'juliangruber/approve-pull-request-action@v1',
25-
'juliangruber/find-pull-request-action@v1',
26-
'juliangruber/read-file-action@v1',
24+
'ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb',
25+
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
26+
'juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b',
27+
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
2728
'pascalgn/automerge-action@c9bd182',
28-
'peter-evans/create-issue-from-file@v2',
29-
'peter-evans/create-pull-request@v2',
30-
'rachmari/[email protected]',
31-
'rachmari/[email protected]',
32-
'repo-sync/github-sync@v2',
33-
'repo-sync/pull-request@v2',
34-
'rtCamp/action-slack-notify@master',
35-
29+
'peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5',
30+
'peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8',
31+
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
32+
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
33+
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
34+
'repo-sync/pull-request@ea6773388b83b337e4da9a223293309f2c3670e7',
35+
'rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815',
3636
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0'
3737
]

.github/workflows/60-days-stale-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
stale:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/stale@v3
10+
- uses: actions/stale@44f9eae0adddf72dbf3eedfacc999f70afcec1a8
1111
with:
1212
repo-token: ${{ secrets.GITHUB_TOKEN }}
1313
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity.'

.github/workflows/auto-label-prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ jobs:
77
if: github.repository == 'github/docs-internal'
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/labeler@v2
10+
- uses: actions/labeler@5f867a63be70efff62b767459b009290364495eb
1111
with:
1212
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/autoupdate-branch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
name: autoupdate
99
runs-on: ubuntu-18.04
1010
steps:
11-
- uses: docker://chinthakagodawita/autoupdate-action:v1
11+
- uses: docker://chinthakagodawita/autoupdate-action:4d72a15b5989091e07d6f4ce4cd3afb7b835ad1e68190937df778b702a547cdc
1212
env:
1313
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
1414
PR_FILTER: labelled
1515
PR_LABELS: autoupdate
16-
MERGE_MSG: "Branch was updated using the 'autoupdate branch' Actions workflow."
16+
MERGE_MSG: "Branch was updated using the 'autoupdate branch' Actions workflow."

.github/workflows/browser-test.yml

Lines changed: 30 additions & 8 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
10-
uses: actions/checkout@v2
11-
- name: Install
12-
uses: ianwalter/[email protected]
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
28+
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
29+
30+
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
31+
name: Install
32+
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
1333
with:
1434
args: npm ci
15-
- name: Test
16-
uses: ianwalter/[email protected]
35+
36+
- if: ${{ needs.see_if_should_skip.outputs.should_skip == 'false' }}
37+
name: Test
38+
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
1739
with:
18-
args: npm run browser-test
40+
args: npm run browser-test

.github/workflows/check-all-english-links.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
if: github.repository == 'github/docs-internal'
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
1414
- name: npm ci
1515
run: npm ci
1616
- name: npm run build
@@ -28,7 +28,7 @@ jobs:
2828
fi
2929
- if: ${{ steps.check.outputs.continue == 'yes' }}
3030
name: Create issue from file
31-
uses: peter-evans/create-issue-from-file@v2
31+
uses: peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5
3232
with:
3333
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
3434
title: ${{ steps.check.outputs.title }}

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
1919
- uses: github/codeql-action/init@v1
2020
with:
2121
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp} (not YET ruby, sorry!)

.github/workflows/crowdin.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
1919

2020
- name: Sync
21-
uses: crowdin/github-action@1.0.10
21+
uses: crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688
2222
with:
2323
upload_translations: false
2424
download_translations: true
@@ -38,7 +38,7 @@ jobs:
3838
crowdin_branch_name: crowdin-main
3939

4040
env:
41-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
GITHUB_TOKEN: ${{ secrets.OCTOGLOT_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
4242

4343
# This is a numeric id, not to be confused with Crowdin API v1 "project identifier" string
4444
# See "API v2" on https://crowdin.com/project/<your-project>/settings#api
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/github-script@44b873bc975058192f5279ebe7579496381f575d
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/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
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/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
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/github-script@44b873bc975058192f5279ebe7579496381f575d
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
@@ -7,7 +7,7 @@ jobs:
77
if: github.event.repository.private == false && github.event.pull_request.merged && github.event.pull_request.base.ref == github.event.repository.default_branch
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/github-script@v3
10+
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
1111
with:
1212
script: |
1313
github.issues.createComment({

0 commit comments

Comments
 (0)