Skip to content

Commit cc939f1

Browse files
authored
Merge branch 'main' into remove-failed-auto-update-workflow
2 parents 4f2b82a + e12b832 commit cc939f1

File tree

9,476 files changed

+1367505
-138562
lines changed

Some content is hidden

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

9,476 files changed

+1367505
-138562
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/ISSUE_TEMPLATE/improve-the-site.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Check to make sure someone hasn't already opened a similar issue: https://github
2222

2323
### What is the current behavior?
2424

25-
<!-- include links to articles where you're seeing a problem, screenshots, what browser you're using, etc. -->
25+
<!-- Include links to articles where you're seeing a problem, screenshots, what browser you're using, etc. -->
2626

2727
### What changes are you suggesting?
2828

.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: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,32 @@ module.exports = [
88
'actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f', //actions/checkout@v2.3.4
99
'actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9', //actions/script@v3.0.0
1010
'actions/labeler@5f867a63be70efff62b767459b009290364495eb', //actions/labeler@v2.2.0
11-
'actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d', //actions/setup-node@v1.4.4
11+
'actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e', //actions/setup-node@v2.1.4
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@0282e8b9fef06de92ddcae9fe6cb44df6226646c',
16+
'cschleiden/actions-linter@43fd4e08e52ed40c0e2782dc2425694388851576',
1517
'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911',
1618
'docker://chinthakagodawita/autoupdate-action:v1',
1719
'fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289',
1820
'github/codeql-action/analyze@v1',
1921
'github/codeql-action/init@v1',
2022
'ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb',
2123
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
22-
'juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b',
24+
'juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9',
2325
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
2426
'lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8',
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',
3335
'someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd',
34-
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0',
35-
'EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575'
36+
'tjenkinson/gh-action-auto-merge-dependency-updates@4d7756c04d9d999c5968697a621b81c47f533d61',
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ on:
1414

1515
jobs:
1616
run:
17+
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
1718
runs-on: ubuntu-latest
1819
steps:
19-
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0
20+
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@4d7756c04d9d999c5968697a621b81c47f533d61
2021
with:
2122
repo-token: ${{ secrets.GITHUB_TOKEN }}
2223
allowed-actors: dependabot[bot]

.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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ on:
55
- main
66
jobs:
77
autoupdate:
8+
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
89
name: autoupdate
9-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-latest
1011
steps:
1112
- uses: docker://chinthakagodawita/autoupdate-action:v1
1213
env:
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Check for Spammy Issues
2+
on:
3+
issues:
4+
types: [opened]
5+
jobs:
6+
spammy-title-check:
7+
name: Remove issues with spammy titles
8+
if: github.repository == 'github/docs'
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
12+
with:
13+
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
14+
script: |
15+
16+
const issue = context.payload.issue
17+
const owner = 'github'
18+
const repo = 'docs'
19+
20+
const titleWordCount = issue.title.trim().split(' ').length
21+
const titleWordCountMin = 2
22+
23+
try {
24+
await github.teams.getMembershipForUserInOrg({
25+
org: 'github',
26+
team_slug: 'employees',
27+
username: context.payload.sender.login,
28+
});
29+
30+
// Do not perform this workflow with GitHub employees. This return
31+
// statement only gets hit if the user is a GitHub employee
32+
return
33+
} catch(err) {
34+
// An error will be thrown if the user is not a GitHub employee
35+
// If a user is not a GitHub employee, we should check to see if title has at least the minimum required number of words in it and if it does, we can exit the workflow
36+
37+
if(titleWordCount > titleWordCountMin) {
38+
return
39+
}
40+
}
41+
42+
//
43+
// Assuming the user is not a GitHub employee and the issue title
44+
// has the minimum number of words required, proceed.
45+
//
46+
47+
// Close the issue and add the invalid label
48+
await github.issues.update({
49+
owner: owner,
50+
repo: repo,
51+
issue_number: issue.number,
52+
labels: ['invalid'],
53+
state: 'closed'
54+
});
55+
56+
// Comment on the issue
57+
await github.issues.createComment({
58+
owner: owner,
59+
repo: repo,
60+
issue_number: issue.number,
61+
body: "This issue appears to have been opened accidentally. I'm going to close it now, but feel free to open a new issue or ask any questions in [discussions](https://github.com/github/docs/discussions)!"
62+
});

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

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

0 commit comments

Comments
 (0)