Skip to content

Commit 40e4b24

Browse files
authored
Merge branch 'main' into patch-1
2 parents 237c3bf + 43dd16f commit 40e4b24

File tree

4,682 files changed

+847069
-63947
lines changed

Some content is hidden

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

4,682 files changed

+847069
-63947
lines changed

.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: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ module.exports = [
1212
'actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526', //actions/[email protected]
1313
'actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4', //actions/stale@v3.0.13
1414
'crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688',
15+
'crykn/copy_folder_to_another_repo_action@abc264e1c16eb3d7b1f7763bfdb0e1699ad43120',
16+
'cschleiden/actions-linter@43fd4e08e52ed40c0e2782dc2425694388851576',
1517
'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911',
1618
'docker://chinthakagodawita/autoupdate-action:v1',
1719
'fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289',
@@ -25,12 +27,13 @@ module.exports = [
2527
'pascalgn/automerge-action@c9bd182',
2628
'peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326',
2729
'peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd',
28-
'peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8',
30+
'peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43',
2931
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
3032
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
3133
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
3234
'repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d',
33-
'rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815',
35+
'someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd',
3436
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0',
35-
'EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575'
37+
'EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575',
38+
'dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58'
3639
]

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55

66
jobs:
77
stale:
8+
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
89
runs-on: ubuntu-latest
910
steps:
1011
- uses: actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4

.github/workflows/automerge-dependencies.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414

1515
jobs:
1616
run:
17+
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
1718
runs-on: ubuntu-latest
1819
steps:
1920
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0

.github/workflows/automerge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
jobs:
2121
automerge:
2222
runs-on: ubuntu-latest
23-
if: contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash')
23+
if: (contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash')) && (github.repository == 'github/docs-internal' || github.repository == 'github/docs')
2424
steps:
2525
- name: automerge
2626
uses: 'pascalgn/automerge-action@c9bd182'

.github/workflows/autoupdate-branch.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
- main
66
jobs:
77
autoupdate:
8+
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
89
name: autoupdate
910
runs-on: ubuntu-18.04
1011
steps:

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

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

.github/workflows/codeql.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ 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'
811

912
jobs:
1013
build:
14+
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
1115
runs-on: ubuntu-latest
12-
1316
steps:
1417
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
1518
- uses: github/codeql-action/init@v1
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Confirm internal staff meant to post in public
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
- reopened
8+
- transferred
9+
pull_request_target:
10+
types:
11+
- opened
12+
- reopened
13+
14+
jobs:
15+
check-team-membership:
16+
runs-on: ubuntu-latest
17+
continue-on-error: true
18+
if: github.repository == 'github/docs'
19+
steps:
20+
- id: membership_check
21+
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
22+
with:
23+
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
24+
script: |
25+
// Only perform this action with GitHub employees
26+
try {
27+
await github.teams.getMembershipForUserInOrg({
28+
org: 'github',
29+
team_slug: 'employees',
30+
username: context.payload.sender.login,
31+
});
32+
} catch(err) {
33+
// An error will be thrown if the user is not a GitHub employee
34+
// If a user is not a GitHub employee, we should stop here and
35+
// Not send a notification
36+
return
37+
}
38+
39+
// Don't perform this action with Docs team members
40+
try {
41+
await github.teams.getMembershipForUserInOrg({
42+
org: 'github',
43+
team_slug: 'docs',
44+
username: context.payload.sender.login,
45+
});
46+
// If the user is a Docs team member, we should stop here and not send
47+
// a notification
48+
return
49+
} catch(err) {
50+
// An error will be thrown if the user is not a Docs team member
51+
// If a user is not a Docs team member we should continue and send
52+
// the notification
53+
}
54+
55+
const issueNo = context.number || context.issue.number
56+
57+
// Create an issue in our private repo
58+
await github.issues.create({
59+
owner: 'github',
60+
repo: 'docs-internal',
61+
title: `@${context.payload.sender.login} confirm that \#${issueNo} should be in the public github/docs repo`,
62+
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`
63+
});
64+
65+
core.setOutput('did_warn', 'true')
66+
67+
- name: Send Slack notification if a GitHub employee who isn't on the docs team opens an issue in public
68+
if: ${{ steps.membership_check.outputs.did_warn && github.repository == 'github/docs' }}
69+
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
70+
with:
71+
channel: ${{ secrets.DOCS_OPEN_SOURCE_SLACK_CHANNEL_ID }}
72+
bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
73+
text: <@${{github.actor}}> opened https://github.com/github/docs/issues/${{ github.event.number || github.event.issue.number }} publicly on the github/docs repo instead of the private github/docs-internal repo. They have been notified via a new issue in the github/docs-internal repo to confirm this was intentional.

0 commit comments

Comments
 (0)