Skip to content

Commit 3afeb93

Browse files
authored
Merge branch 'main' into patch-1
2 parents 2220b6c + 9c47a9e commit 3afeb93

File tree

231 files changed

+636017
-3781
lines changed

Some content is hidden

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

231 files changed

+636017
-3781
lines changed

.env.example

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
ALGOLIA_API_KEY=
22
ALGOLIA_APPLICATION_ID=
33
ALLOW_TRANSLATION_COMMITS=
4-
EARLY_ACCESS_HOSTNAME=
5-
EARLY_ACCESS_SHARED_SECRET=
6-
GITHUB_TOKEN=

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ package.json @github/docs-engineering
2020
# Site Policy
2121
/content/github/site-policy/ @github/site-policy-admins
2222

23+
# Content strategy
24+
/contributing/content-markup-reference.md @github/product-docs-content-strategy
25+
/contributing/content-style-guide.md @github/product-docs-content-strategy
26+
2327
# Make sure that Octokit maintainers get notified about changes
2428
# relevant to the Octokit libraries (https://github.com/octokit)
2529
/content/rest/reference @github/octokit-maintainers

.github/ISSUE_TEMPLATE/improve-existing-docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ labels:
77
assignees: ''
88
---
99
<!--
10-
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.
10+
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT INSTEAD.
1111
-->
1212

1313
<!--
1414
For questions, ask in Discussions: https://github.com/github/docs/discussions
1515
16-
Before you file an issue read the:
16+
Before you file an issue read the:
1717
- Code of Conduct: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md
1818
- Contributing guide: https://github.com/github/docs/blob/main/CONTRIBUTING.md
1919

.github/ISSUE_TEMPLATE/improve-the-site.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ assignees: ''
77
---
88

99
<!--
10-
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.
10+
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT INSTEAD.
1111
-->
1212

1313
<!--
1414
For questions, ask in Discussions: https://github.com/github/docs/discussions
1515
16-
Before you file an issue read the:
16+
Before you file an issue read the:
1717
- Code of Conduct: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md
1818
- Contributing guide: https://github.com/github/docs/blob/main/CONTRIBUTING.md
1919
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Close unwanted pull requests
2+
on:
3+
pull_request:
4+
paths:
5+
- '.github/workflows/**'
6+
- '.github/CODEOWNERS'
7+
- 'translations/**'
8+
- 'assets/fonts/**'
9+
- 'data/graphql/**'
10+
- 'lib/graphql/**'
11+
- 'lib/redirects/**'
12+
- 'lib/webhooks/**'
13+
jobs:
14+
close_unwanted_pull_requests:
15+
if: github.repository == 'github/docs' && github.event.pull_request.user.login != 'Octomerger'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
19+
with:
20+
script: |
21+
await github.issues.createComment({
22+
...context.repo,
23+
issue_number: context.payload.pull_request.number,
24+
body:
25+
`Thanks for contributing! We do not accept community changes to these files at this time.
26+
- '.github/workflows/**'
27+
- '.github/CODEOWNERS'
28+
- 'translations/**'
29+
- 'assets/fonts/**'
30+
- 'data/graphql/**'
31+
- 'lib/graphql/**'
32+
- 'lib/redirects/**'
33+
- 'lib/webhooks/**'`
34+
})
35+
await github.issues.update({
36+
...context.repo,
37+
issue_number: context.payload.pull_request.number,
38+
state: 'closed'
39+
})

.github/workflows/openapi-decorate.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ jobs:
1010
if: github.event.pull_request.user.login == 'github-openapi-bot'
1111
runs-on: ubuntu-latest
1212
steps:
13+
- name: Label pull requests with 'github-openapi-bot'
14+
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
15+
with:
16+
repo-token: '${{ secrets.GITHUB_TOKEN }}'
17+
add-labels: 'github-openapi-bot'
1318
- name: Checkout repository code
1419
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
1520

.github/workflows/sync-algolia-search-indices.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737
if: failure()
3838
env:
3939
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
40-
SLACK_MESSAGE: The last Algolia workflow run for ${{github.repository}} failed. See https://github.com/github/docs-internal/actions?query=workflow%3AAlgolia
40+
SLACK_MESSAGE: The last Algolia workflow run for ${{github.repository}} failed. Search actions for `workflow:Algolia`

.github/workflows/test.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
cancel_others: 'false'
2929
github_token: ${{ github.token }}
30-
paths: '[".github/workflows/test.yml",".node-version", ".npmrc", "app.json", "content/**", "data/**","lib/**", "Dockerfile", "feature-flags.json", "Gemfile", "Gemfile.lock", "middleware/**", "node_modules/**","package.json", "package-lock.json", "server.js", "tests/**", "translations/**", "Procfile", "webpack.config.js"]'
30+
paths: '[".github/workflows/test.yml", ".node-version", ".npmrc", "app.json", "content/**", "data/**","lib/**", "Dockerfile", "feature-flags.json", "Gemfile", "Gemfile.lock", "middleware/**", "node_modules/**","package.json", "package-lock.json", "server.js", "tests/**", "translations/**", "Procfile", "webpack.config.js"]'
3131

3232
test:
3333
needs: see_if_should_skip
@@ -36,13 +36,17 @@ jobs:
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
test-group: [content, meta, rendering, routing, unit, links-and-images]
39+
test-group:
40+
[content, meta, rendering, routing, unit, links-and-images, graphql]
4041
steps:
4142
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
4243
# Even if if doesn't do anything
4344
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
4445
name: Check out repo
4546
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
47+
with:
48+
# Enables cloning the Early Access repo later with the relevant PAT
49+
persist-credentials: 'false'
4650

4751
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
4852
name: Setup node
@@ -69,19 +73,19 @@ jobs:
6973
name: Install dependencies
7074
run: npm ci
7175

72-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
73-
name: Run build script
76+
- name: Clone early access
77+
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository == 'github/docs-internal' }}
78+
run: npm run heroku-postbuild
79+
env:
80+
DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }}
81+
GIT_BRANCH: ${{ github.ref }}
82+
83+
- name: Run build script
84+
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository != 'github/docs-internal' }}
7485
run: npm run build
7586

7687
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
7788
name: Run tests
7889
run: npx jest tests/${{ matrix.test-group }}/
7990
env:
8091
NODE_OPTIONS: '--max_old_space_size=4096'
81-
82-
- name: Send Slack notification if workflow fails
83-
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
84-
if: failure() && github.ref == 'early-access'
85-
env:
86-
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
87-
SLACK_MESSAGE: 'Tests are failing on the `early-access` branch. https://github.com/github/docs-internal/tree/early-access'

.github/workflows/update-graphql-files.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,15 @@ jobs:
3737
env:
3838
# need to use a token from a user with access to github/github for this step
3939
GITHUB_TOKEN: ${{ secrets.ZEKE_PAT_WITH_REPO_AND_WORKFLOW_SCOPE_FOR_REPO_SYNC }}
40-
# technically the changelog should only be updated once per day, but we can safely
41-
# run build-changelog-from-markdown.js in its current form once per hour; when we
42-
# rewrite the changelog script, we may need to run it in a separate workflow on a
43-
# once-per-day schedule; see details in https://github.com/github/docs-internal/issues/12722.
4440
run: |
4541
script/graphql/update-files.js
46-
script/graphql/build-changelog-from-markdown.js
4742
- name: Create pull request
4843
id: create-pull-request
4944
uses: peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8
5045
with:
5146
# need to use a token with repo and workflow scopes for this step
5247
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
53-
commit-message: 'Action ran graphql scripts "update-files" and "build-changelog-from-markdown"'
48+
commit-message: 'Action ran graphql script"update-files"'
5449
title: GraphQL schema update
5550
body:
5651
"Hello! Some GraphQL data in github/github was updated recently. This PR

.gitignore

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
.algolia-cache
22
.DS_Store
33
.env
4-
node_modules
4+
/node_modules/
55
npm-debug.log
6-
coverage
6+
coverage/
77
.linkinator
8-
broken_links.md
8+
/assets/images/early-access
9+
/content/early-access
10+
/data/early-access
911
dist
12+
13+
# blc: broken link checker
14+
blc_output.log
15+
blc_output_internal.log
16+
/dist/
17+
broken_links.md

0 commit comments

Comments
 (0)