Skip to content

Commit 5576c07

Browse files
authored
Merge branch 'main' into patch-1
2 parents a7a93f8 + 55bf812 commit 5576c07

3,095 files changed

Lines changed: 56181 additions & 12818 deletions

File tree

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ package.json @github/docs-engineering
2121
/content/github/site-policy/ @github/site-policy-admins
2222

2323
# Content strategy
24-
/contributing/content-markup-reference.md @github/product-docs-content-strategy
25-
/contributing/content-style-guide.md @github/product-docs-content-strategy
24+
/contributing/content-markup-reference.md @github/docs-content-strategy
25+
/contributing/content-style-guide.md @github/docs-content-strategy
2626

2727
# Make sure that Octokit maintainers get notified about changes
2828
# relevant to the Octokit libraries (https://github.com/octokit)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Thanks again!
2121
<!-- Share artifacts of the changes, be they code snippets, GIFs or screenshots; whatever shares the most context. -->
2222

2323
### Check off the following:
24-
- [ ] All of the tests are passing.
2524
- [ ] I have reviewed my changes in staging. (look for the **deploy-to-heroku** link in your pull request, then click **View deployment**)
2625
- [ ] For content changes, I have reviewed the [localization checklist](https://github.com/github/docs/blob/main/contributing/localization-checklist.md)
2726
- [ ] For content changes, I have reviewed the [Content style guide for GitHub Docs](https://github.com/github/docs/blob/main/contributing/content-style-guide.md).

.github/allowed-actions.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ module.exports = [
2525
'pascalgn/automerge-action@c9bd182',
2626
'peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326',
2727
'peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd',
28-
'peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8',
28+
'peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43',
2929
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
3030
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
3131
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
3232
'repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d',
3333
'someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd',
3434
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0',
35-
'EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575'
35+
'EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575',
36+
'dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58'
3637
]

.github/workflows/autoupdate-repo-sync-branch-on-cron.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/close-unwanted-pull-requests.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/codeql.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: CodeQL analysis
22

33
on:
44
push:
5+
branches: main
6+
pull_request:
7+
branches: main
58
paths:
69
- '**/*.js'
710
- '.github/workflows/codeql.yml'

.github/workflows/confirm-internal-staff-work-in-docs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
continue-on-error: true
1818
if: github.repository == 'github/docs'
1919
steps:
20-
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
20+
- id: membership_check
21+
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
2122
with:
2223
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
2324
script: |
@@ -61,10 +62,10 @@ jobs:
6162
body: `@${context.payload.sender.login} opened https://github.com/github/docs/issues/${issueNo} publicly in the github/docs repo, instead of the private github/docs-internal repo.\n\n@${context.payload.sender.login}, please confirm that this belongs in the public repo and that no sensitive information was disclosed by commenting below and closing the issue.\n\nIf this was not intentional and sensitive information was shared, please delete https://github.com/github/docs/issues/${issueNo} and notify us in the \#docs-open-source channel.\n\nThanks! \n\n/cc @github/docs @github/docs-engineering`
6263
});
6364
64-
throw new Error('A Hubber opened an issue on the public github/docs repo');
65+
core.setOutput('did_warn', 'true')
6566
6667
- name: Send Slack notification if a GitHub employee who isn't on the docs team opens an issue in public
67-
if: ${{ failure() && github.repository == 'github/docs' }}
68+
if: ${{ steps.membership_check.outputs.did_warn && github.repository == 'github/docs' }}
6869
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
6970
with:
7071
channel: ${{ secrets.DOCS_OPEN_SOURCE_SLACK_CHANNEL_ID }}

.github/workflows/remove-unused-assets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Remove script results file
3434
run: rm -rf ./results.md
3535
- name: Create pull request
36-
uses: peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8
36+
uses: peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43
3737
with:
3838
# need to use a token with repo and workflow scopes for this step
3939
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}

.github/workflows/repo-sync-stalls.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,18 @@ jobs:
3636
return
3737
}
3838
39+
// Remove all pull requests that don't have the
40+
// 'automated-reposync-pr' label
41+
pulls.data = pulls.data.filter(pr =>
42+
pr.labels.some(label => label.name === 'automated-reposync-pr')
43+
)
44+
45+
// Search for pull requests that have been open too long
3946
pulls.data.forEach(pr => {
4047
const timeDelta = Date.now() - Date.parse(pr.created_at);
4148
const minutesOpen = timeDelta / 1000 / 60;
4249
43-
if (minutesOpen > 30) {
50+
if (minutesOpen > 180) {
4451
core.setFailed('Repo sync appears to be stalled')
4552
}
4653
})

.github/workflows/repo-sync.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
4545

4646
- name: Create pull request
47+
id: create-pull
4748
uses: repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d
4849
env:
4950
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
@@ -70,6 +71,35 @@ jobs:
7071
github-token: ${{ secrets.GITHUB_TOKEN }}
7172
number: ${{ steps.find-pull-request.outputs.number }}
7273

74+
# There are cases where the branch becomes out-of-date in between the time this workflow began and when the pull request is created/updated
75+
- name: Update branch
76+
if: ${{ steps.find-pull-request.outputs.number }}
77+
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
78+
with:
79+
github-token: ${{ secrets.GITHUB_TOKEN }}
80+
script: |
81+
const mainHeadSha = await github.git.getRef({
82+
...context.repo,
83+
ref: 'heads/main'
84+
})
85+
console.log(`heads/main sha: ${mainHeadSha.data.object.sha}`)
86+
87+
const pull = await github.pulls.get({
88+
...context.repo,
89+
pull_number: parseInt(${{ steps.find-pull-request.outputs.number }})
90+
})
91+
console.log(`Pull request base sha: ${pull.data.base.sha}`)
92+
93+
if (mainHeadSha.data.object.sha !== pull.data.base.sha || pull.data.mergeable_state === 'behind') {
94+
const updateBranch = await github.pulls.updateBranch({
95+
...context.repo,
96+
pull_number: parseInt(${{ steps.find-pull-request.outputs.number }})
97+
})
98+
console.log(updateBranch.data.message)
99+
} else {
100+
console.log(`Branch is already up-to-date`)
101+
}
102+
73103
- name: Send Slack notification if workflow fails
74104
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
75105
if: failure()

0 commit comments

Comments
 (0)