Skip to content

Commit 3d90ab5

Browse files
authored
Merge branch 'main' into hotfix/transfer-repository
2 parents dccfe8d + b1da73c commit 3d90ab5

436 files changed

Lines changed: 385673 additions & 167789 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/ISSUE_COMMENT_TEMPLATE/quick-status.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ body:
1414
value: 'Status: YELLOW'
1515
- label: "RED \U0001F534 (BLOCKED)"
1616
value: 'Status: RED'
17+
- label: "BLACK ⚫️ (We shipped it \U0001F389)"
18+
value: 'Status: BLACK'
1719
- type: textarea
1820
attributes:
1921
label: Update Summary

.github/actions-scripts/enterprise-server-issue-templates/release-issue.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,21 @@
3434
```
3535
☝️ This will run a workflow **on every push to the PR** that will sync **only** the English index for the new version to Algolia. This will make the GHES content searchable on staging throughout content creation, and will ensure the search updates go live at the same time the content is published. See [`contributing/search.md`](https://github.com/github/docs-internal/blob/main/contributing/search.md) for details.
3636
37-
- [ ] Create an OpenAPI topic branch
38-
39-
This branch is used to avoid propagating the OpenAPI dev mode check CI test failure in all of the branches. All changes that affect the OpenAPI schema should branch off of this topic branch. The tests should all be passing before the OpenAPI topic branch is merged into the megabranch.
40-
41-
For more information about how OpenAPI changes are published to docs.github.com, see [Publishing REST API changes to docs.github.com](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/publishing-documentation/publishing-REST-api-docs.md#publishing-rest-api-changes-to-docsgithubcom).
42-
4337
- [ ] In `github/github`, to create a new GHES release follow these steps:
4438
- [ ] Copy the previous release's root document to a new root document for this release `cp app/api/description/ghes-<LATEST RELEASE NUMBER>.yaml app/api/description/ghes-<NEXT RELEASE NUMBER>.yaml`.
4539
- [ ] Update the `externalDocs.url` property in that file to use the new GHES release number.
4640
- [ ] Copy the previous release's configuration file to a new configuration file for this release `cp app/api/description/config/releases/ghes-<LATEST RELEASE NUMBER>.yaml app/api/description/config/releases/ghes-<NEXT RELEASE NUMBER>.yaml`.
4741
- [ ] Update the `variables.externalDocsUrl`, `variables.ghesVersion`, and `patch.[].value.url` in that file to use the new GHES release number.
4842
- [ ] Update `published` in that file to `false`. **Note:** This is important to ensure that 3.1 OpenAPI changes are not made public until 3.1 is released.
4943
44+
#### Troubleshooting
45+
46+
If the `OpenAPI dev mode check / check-schema-versions` check fails on the release branch, in your local checkout of the mega branch:
47+
48+
- run `git checkout origin/main lib/rest/static/*`
49+
- run `script/rest/update-files.js --decorate-only`
50+
- push the resulting changes
51+
5052
### Before shipping the release branch
5153
5254
- [ ] Add the GHES release notes to `data/release-notes/` and update the versioning frontmatter in `content/admin/release-notes.md` to `enterprise-server: '<=<RELEASE>'`

.github/allowed-actions.js

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

66
module.exports = [
7-
"actions/cache@0781355a23dac32fd3bac414512f4b903437991a", //actions/cache@v2.1.3
8-
"actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f", //actions/checkout@v2.3.4
9-
"actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9", //actions/script@v3.0.0
10-
"actions/labeler@5f867a63be70efff62b767459b009290364495eb", //actions/labeler@v2.2.0
11-
"actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e", //actions/setup-node@v2.1.4
12-
"ruby/setup-ruby@fdcfbcf14ec9672f6f615cb9589a1bc5dd69d262", //ruby/setup-ruby@vv1.64.1
13-
"actions/stale@9d6f46564a515a9ea11e7762ab3957ee58ca50da", //actions/stale@v3.0.16
7+
"actions/cache@0781355a23dac32fd3bac414512f4b903437991a", // v2.1.3
8+
"actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f", // v2.3.4
9+
"actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9", // v3.0.0
10+
"actions/labeler@5f867a63be70efff62b767459b009290364495eb", // v2.2.0
11+
"actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e", // v2.1.4
12+
"ruby/setup-ruby@fdcfbcf14ec9672f6f615cb9589a1bc5dd69d262", // v1.64.1
13+
"actions/stale@9d6f46564a515a9ea11e7762ab3957ee58ca50da", // v3.0.16
1414
"alex-page/github-project-automation-plus@fdb7991b72040d611e1123d2b75ff10eda9372c9",
1515
"andymckay/labeler@22d5392de2b725cea4b284df5824125054049d84",
1616
"archive/github-actions-slack@d368c5a4ad757515a9344918f84c490b05777d94",
@@ -23,11 +23,11 @@ module.exports = [
2323
"github/codeql-action/analyze@v1",
2424
"github/codeql-action/init@v1",
2525
"juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8",
26-
"juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9",
26+
"juliangruber/find-pull-request-action@db875662766249c049b2dcd85293892d61cb0b51", // v1.5.0
2727
"juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512",
2828
"lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8",
2929
"lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb",
30-
"pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07", //pascalgn/automerge@0.12.0
30+
"pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07", // v0.12.0
3131
"peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326",
3232
"peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd",
3333
"peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43",
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Copy to REST API issue to docs-content
2+
3+
# **What it does**: Copies an issue in the open source repo to the docs-content repo, comments on and closes the original issue
4+
# **Why we have it**: REST API updates cannot be made in the open source repo. Instead, we copy the issue to an internal issue (we do not transfer so that the issue does not disappear for the contributor) and close the original issue.
5+
# **Who does it impact**: Open source and docs-content maintainers
6+
7+
on:
8+
issues:
9+
types:
10+
- labeled
11+
12+
jobs:
13+
transfer-issue:
14+
name: Transfer issue
15+
runs-on: ubuntu-latest
16+
if: github.event.label.name == 'rest-description' && github.repository == 'github/docs'
17+
steps:
18+
- name: Check if this run was triggered by a member of the docs team
19+
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
20+
id: triggered-by-member
21+
with:
22+
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
23+
result-encoding: string
24+
script: |
25+
const triggerer_login = context.payload.sender.login
26+
const teamMembers = await github.request(
27+
`/orgs/github/teams/docs/members?per_page=100`
28+
)
29+
const logins = teamMembers.data.map(member => member.login)
30+
if (logins.includes(triggerer_login)) {
31+
console.log(`This workflow was triggered by ${triggerer_login} (on the docs team).`)
32+
return 'true'
33+
}
34+
console.log(`This workflow was triggered by ${triggerer_login} (not on the docs team), so no action will be taken.`)
35+
return 'false'
36+
37+
- name: Exit if not triggered by a docs team member
38+
if: steps.triggered-by-member.outputs.result == 'false'
39+
run: |
40+
echo Aborting. This workflow must be triggered by a member of the docs team.
41+
exit 1
42+
43+
- name: Create an issue in the docs-content repo
44+
run: |
45+
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --repo github/docs-content)"
46+
echo 'NEW_ISSUE='$new_issue_url >> $GITHUB_ENV
47+
env:
48+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
49+
ISSUE_TITLE: ${{ github.event.issue.title }}
50+
ISSUE_BODY: ${{ github.event.issue.body }}
51+
52+
- name: Comment on the new issue
53+
run: gh issue comment $NEW_ISSUE --body "This issue was originally opened in the open source repo as $OLD_ISSUE"
54+
env:
55+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
56+
NEW_ISSUE: ${{ env.NEW_ISSUE }}
57+
OLD_ISSUE: ${{ github.event.issue.html_url }}
58+
59+
- name: Comment on the old issue
60+
run: gh issue comment $OLD_ISSUE --body "Thank you for opening this issue! Updates to the REST API description must be made internally. I have copied your issue to an internal issue, so I will close this issue."
61+
env:
62+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
63+
OLD_ISSUE: ${{ github.event.issue.html_url }}
64+
65+
- name: Close the old issue
66+
run: gh issue close $OLD_ISSUE
67+
env:
68+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
69+
OLD_ISSUE: ${{ github.event.issue.html_url }}

.github/workflows/move-ready-to-merge-issues.yaml renamed to .github/workflows/move-ready-to-merge-pr.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: Move and unlabel ready to merge issues
1+
name: Move and unlabel ready to merge PRs
22

3-
# **What it does**: This moves ready to merge issues on the project board for the open source repo. When an issue in the open source repo is labeled "ready to merge," the "waiting for review" label is removed and the issue is moved to the "Triage" column.
4-
# **Why we have it**: To help with managing our project boards.
3+
# **What it does**: When a PR in the open source repo is labeled "ready to merge," the "waiting for review" label is removed and the PR is moved to the "Triage" column.
4+
# **Why we have it**: To help with managing our project boards.
55
# **Who does it impact**: Open source contributors, open-source maintainers.
66

77
on:
@@ -14,7 +14,7 @@ jobs:
1414
if: github.repository == 'github/docs' && github.event.label.name == 'ready to merge'
1515
runs-on: ubuntu-latest
1616
steps:
17-
- name: move issue
17+
- name: move PR
1818
uses: alex-page/github-project-automation-plus@fdb7991b72040d611e1123d2b75ff10eda9372c9
1919
with:
2020
project: Docs team reviews

.github/workflows/no-response.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name: No Response
99

1010
on:
1111
issue_comment:
12-
types: created
12+
types: [created]
1313

1414
schedule:
1515
# Schedule for five minutes after the hour every hour
@@ -27,4 +27,6 @@ jobs:
2727
to our request for more information from the original author. With only the
2828
information that is currently in the issue, we don't have enough information
2929
to take action. Please reach out if you have or find the answers we need so
30-
that we can investigate further. See [this blog post on bug reports and the importance of repro steps](https://www.lee-dohm.com/2015/01/04/writing-good-bug-reports/) for more information about the kind of information that may be helpful.
30+
that we can investigate further. See [this blog post on bug reports and the
31+
importance of repro steps](https://www.lee-dohm.com/2015/01/04/writing-good-bug-reports/)
32+
for more information about the kind of information that may be helpful.

.github/workflows/open-enterprise-issue.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Open Enterprise release or deprecation issue
22

3+
# **What it does**: Checks if there is an Enterprise release or deprecation upcoming, and if so, opens an issue with the tasks to be completed.
4+
# **Why we have it**: GHES releases and deprecations run on a predictable schedule, so we can automate some of the project management aspects.
5+
# **Who does it impact**: Docs engineering, docs content.
6+
37
on:
48
schedule:
59
- cron: '49 14 * * *' # At 14:49 UTC daily

.github/workflows/repo-sync.yml

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,23 @@ jobs:
2727
steps:
2828
- name: Find pull request
2929
if: ${{ github.repository == 'github/docs' }}
30-
uses: juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9
30+
uses: juliangruber/find-pull-request-action@db875662766249c049b2dcd85293892d61cb0b51
3131
id: find-pull-request
3232
with:
33-
github-token: ${{ secrets.GITHUB_TOKEN }}
33+
github-token: ${{ secrets.DOCS_BOT_SPAM_VISION }}
3434
branch: repo-sync
3535
base: main
36+
state: open
3637

3738
- name: Close pull request if unwanted
3839
if: ${{ github.repository == 'github/docs' && steps.find-pull-request.outputs.number }}
3940
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
4041
with:
41-
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
42+
github-token: ${{ secrets.DOCS_BOT_SPAM_VISION }}
4243
script: |
4344
const { owner, repo } = context.repo
4445
45-
const pr = await github.pulls.get({
46+
const { data: pr } = await github.pulls.get({
4647
owner,
4748
repo,
4849
pull_number: parseInt(${{ steps.find-pull-request.outputs.number }})
@@ -115,17 +116,18 @@ jobs:
115116
destination_branch: main
116117
pr_title: 'repo sync'
117118
pr_body: "This is an automated pull request to sync changes between the public and private repos.\n\n:robot: This pull request should be merged (not squashed) to preserve continuity across repos, so please let a bot do the merging!"
118-
pr_label: automerge,autoupdate,automated-reposync-pr
119+
pr_label: autoupdate,automated-reposync-pr
119120
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
120121

121122
- name: Find pull request
122-
uses: juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9
123+
uses: juliangruber/find-pull-request-action@db875662766249c049b2dcd85293892d61cb0b51
123124
id: find-pull-request
124125
with:
125126
github-token: ${{ secrets.GITHUB_TOKEN }}
126127
branch: repo-sync
127128
base: main
128129
author: Octomerger
130+
state: open
129131

130132
- name: Approve pull request
131133
if: ${{ steps.find-pull-request.outputs.number }}
@@ -139,7 +141,7 @@ jobs:
139141
if: ${{ steps.find-pull-request.outputs.number }}
140142
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
141143
with:
142-
github-token: ${{ secrets.GITHUB_TOKEN }}
144+
github-token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
143145
script: |
144146
const mainHeadSha = await github.git.getRef({
145147
...context.repo,
@@ -163,6 +165,41 @@ jobs:
163165
console.log(`Branch is already up-to-date`)
164166
}
165167
168+
- name: Enable GitHub auto-merge
169+
if: ${{ steps.find-pull-request.outputs.number }}
170+
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
171+
with:
172+
github-token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
173+
script: |
174+
const pull = await github.pulls.get({
175+
...context.repo,
176+
pull_number: parseInt(${{ steps.find-pull-request.outputs.number }})
177+
})
178+
179+
const pullNodeId = pull.data.node_id
180+
console.log(`Pull request GraphQL Node ID: ${pullNodeId}`)
181+
182+
const mutation = `mutation ($id: ID!) {
183+
enablePullRequestAutoMerge(input: {
184+
pullRequestId: $id,
185+
mergeMethod: MERGE
186+
}) {
187+
clientMutationId
188+
}
189+
}`
190+
const variables = {
191+
id: pullNodeId
192+
}
193+
194+
const graph = await github.graphql(mutation, variables)
195+
console.log('GraphQL mutation result:\n' + JSON.stringify(graph))
196+
197+
if (graph.errors && graph.errors.length > 0) {
198+
console.error('ERROR! Failed to enable auto-merge:\n - ' + graph.errors.map(error => error.message).join('\n - '))
199+
} else {
200+
console.log('Auto-merge enabled!')
201+
}
202+
166203
- name: Send Slack notification if workflow fails
167204
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
168205
if: failure()
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Send Crowdin PRs to boards
22

3+
# **What it does**: Sends PRs opened on the crowdin branch to the ready for work column in this board: https://github.com/orgs/github/projects/1269#column-13447153
4+
# **Why we have it**: To make sure the first responder sees crowdin translations that need to be merged as they review the Task board.
5+
# **Who does it impact**: Docs localization and Docs Engineering
6+
37
on:
48
pull_request:
59
types:
@@ -14,7 +18,7 @@ jobs:
1418
with:
1519
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
1620
script: |
17-
var squadBoardColumnId = 13447153; // Add to the team backlog/squad board
21+
var squadBoardColumnId = 13447153; // Add to the team task board
1822
1923
try {
2024
await github.projects.createCard({
@@ -25,14 +29,3 @@ jobs:
2529
} catch (error) {
2630
console.log(error);
2731
}
28-
29-
var prBoardColumnId = 10095775; // Add to the pull requests board
30-
try {
31-
await github.projects.createCard({
32-
column_id: prBoardColumnId,
33-
content_id: context.payload.pull_request.id,
34-
content_type: "PullRequest"
35-
});
36-
} catch (error) {
37-
console.log(error);
38-
}

.github/workflows/send-issues-to-how-how-we-work-boards.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
continue-on-error: true
1818
steps:
19-
- if: contains(github.event.issue.labels.*.name, 'engineering') && !contains(github.event.issue.labels.*.name, 'feature') && !contains(github.event.issue.labels.*.name, 'epic')
19+
- if: (github.repository == 'github/docs-internal') && contains(github.event.issue.labels.*.name, 'engineering') && !contains(github.event.issue.labels.*.name, 'feature') && !contains(github.event.issue.labels.*.name, 'epic')
2020
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
2121
with:
2222
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
@@ -31,7 +31,7 @@ jobs:
3131
} catch (error) {
3232
console.log(error);
3333
}
34-
- if: contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'feature')
34+
- if: (github.repository == 'github/docs-internal') && contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'feature')
3535
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
3636
with:
3737
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
@@ -46,7 +46,7 @@ jobs:
4646
} catch (error) {
4747
console.log(error);
4848
}
49-
- if: contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'epic')
49+
- if: (github.repository == 'github/docs-internal') && contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'epic')
5050
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
5151
with:
5252
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}

0 commit comments

Comments
 (0)