Merge branch 'main' into patch-1
18
.devcontainer.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Codespaces environment for docs.github.com
|
||||||
|
// For format details, see https://aka.ms/vscode-remote/devcontainer.json
|
||||||
|
{
|
||||||
|
"name": "docs.github.com",
|
||||||
|
"service": "container-doc",
|
||||||
|
"settings": {
|
||||||
|
"terminal.integrated.shell.linux": "/bin/bash",
|
||||||
|
"cSpell.language": ",en"
|
||||||
|
},
|
||||||
|
// Install pre-requisites, and start to serve docs.github.com locally
|
||||||
|
"postCreateCommand": "npm install && npm start",
|
||||||
|
"forwardPorts": [4000],
|
||||||
|
// Visual Studio Code extensions which help authoring for docs.github.com.
|
||||||
|
"extensions": [
|
||||||
|
"yzhang.markdown-all-in-one",
|
||||||
|
"streetsidesoftware.code-spell-checker"
|
||||||
|
]
|
||||||
|
}
|
||||||
11
.editorconfig
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
1
.eslintignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
dist/
|
||||||
28
.eslintrc.js
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
commonjs: true,
|
||||||
|
es2020: true,
|
||||||
|
node: true
|
||||||
|
},
|
||||||
|
parser: 'babel-eslint',
|
||||||
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
'standard'
|
||||||
|
],
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 11
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: [
|
||||||
|
'**/tests/**/*.js'
|
||||||
|
],
|
||||||
|
env: {
|
||||||
|
jest: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -14,8 +14,8 @@ HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN I
|
|||||||
For questions, ask in Discussions: https://github.com/github/docs/discussions
|
For questions, ask in Discussions: https://github.com/github/docs/discussions
|
||||||
|
|
||||||
Before you file an issue read the:
|
Before you file an issue read the:
|
||||||
- Code of Conduct: https://github.com/github/docs/blob/onboarding/CODE_OF_CONDUCT.md
|
- Code of Conduct: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md
|
||||||
- Contributing guide: https://github.com/github/docs/blob/onboarding/CONTRIBUTING.md
|
- Contributing guide: https://github.com/github/docs/blob/main/CONTRIBUTING.md
|
||||||
|
|
||||||
Check to make sure someone hasn't already opened a similar issue: https://github.com/github/docs/issues
|
Check to make sure someone hasn't already opened a similar issue: https://github.com/github/docs/issues
|
||||||
-->
|
-->
|
||||||
|
|||||||
4
.github/ISSUE_TEMPLATE/improve-the-site.md
vendored
@@ -14,8 +14,8 @@ HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN I
|
|||||||
For questions, ask in Discussions: https://github.com/github/docs/discussions
|
For questions, ask in Discussions: https://github.com/github/docs/discussions
|
||||||
|
|
||||||
Before you file an issue read the:
|
Before you file an issue read the:
|
||||||
- Code of Conduct: https://github.com/github/docs/blob/onboarding/CODE_OF_CONDUCT.md
|
- Code of Conduct: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md
|
||||||
- Contributing guide: https://github.com/github/docs/blob/onboarding/CONTRIBUTING.md
|
- Contributing guide: https://github.com/github/docs/blob/main/CONTRIBUTING.md
|
||||||
|
|
||||||
Check to make sure someone hasn't already opened a similar issue: https://github.com/github/docs/issues
|
Check to make sure someone hasn't already opened a similar issue: https://github.com/github/docs/issues
|
||||||
-->
|
-->
|
||||||
|
|||||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -22,6 +22,6 @@ Thanks again!
|
|||||||
|
|
||||||
### Check off the following:
|
### Check off the following:
|
||||||
- [ ] All of the tests are passing.
|
- [ ] All of the tests are passing.
|
||||||
- [ ] I have reviewed my changes in staging.
|
- [ ] I have reviewed my changes in staging. (look for the **deploy-to-heroku** link in your pull request, then click **View deployment**)
|
||||||
- [ ] For content changes, I have reviewed the [localization checklist](https://github.com/github/docs/blob/main/contributing/localization-checklist.md)
|
- [ ] For content changes, I have reviewed the [localization checklist](https://github.com/github/docs/blob/main/contributing/localization-checklist.md)
|
||||||
- [ ] 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).
|
- [ ] 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).
|
||||||
|
|||||||
36
.github/actions-scripts/enterprise-algolia-label.js
vendored
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const fs = require('fs')
|
||||||
|
const core = require('@actions/core')
|
||||||
|
const eventPayload = JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH, 'utf8'))
|
||||||
|
|
||||||
|
// This workflow-run script does the following:
|
||||||
|
// 1. Gets an array of labels on a PR.
|
||||||
|
// 2. Finds one with the relevant Algolia text; if none found, exits early.
|
||||||
|
// 3. Gets the version substring from the label string.
|
||||||
|
|
||||||
|
const labelText = 'sync-english-index-for-'
|
||||||
|
const labelsArray = eventPayload.pull_request.labels
|
||||||
|
|
||||||
|
// Exit early if no labels are on this PR
|
||||||
|
if (!(labelsArray && labelsArray.length)) {
|
||||||
|
process.exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find the relevant label
|
||||||
|
const algoliaLabel = labelsArray
|
||||||
|
.map(label => label.name)
|
||||||
|
.find(label => label.startsWith(labelText))
|
||||||
|
|
||||||
|
// Exit early if no relevant label is found
|
||||||
|
if (!algoliaLabel) {
|
||||||
|
process.exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Given: sync-english-index-for-enterprise-server@3.0
|
||||||
|
// Returns: enterprise-server@3.0
|
||||||
|
const versionToSync = algoliaLabel.split(labelText)[1]
|
||||||
|
|
||||||
|
// Store the version so we can access it later in the workflow
|
||||||
|
core.setOutput('versionToSync', versionToSync)
|
||||||
|
process.exit(0)
|
||||||
41
.github/actions-scripts/openapi-schema-branch.js
vendored
Executable file
@@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const fs = require('fs')
|
||||||
|
const path = require('path')
|
||||||
|
const { execSync } = require('child_process')
|
||||||
|
const semver = require('semver')
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This script performs two checks to prevent shipping development mode OpenAPI schemas:
|
||||||
|
* - Ensures the `info.version` property is a semantic version.
|
||||||
|
* In development mode, the `info.version` property is a string
|
||||||
|
* containing the `github/github` branch name.
|
||||||
|
* - Ensures the decorated schema matches the dereferenced schema.
|
||||||
|
* The workflow that calls this script runs `script/rest/update-files.js`
|
||||||
|
* with the `--decorate-only` switch then checks to see if files changed.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Check that the `info.version` property is a semantic version
|
||||||
|
const dereferencedDir = path.join(process.cwd(), 'lib/rest/static/dereferenced')
|
||||||
|
const schemas = fs.readdirSync(dereferencedDir)
|
||||||
|
schemas.forEach(filename => {
|
||||||
|
const schema = require(path.join(dereferencedDir, filename))
|
||||||
|
if (!semver.valid(schema.info.version)) {
|
||||||
|
console.log(`🚧⚠️ Your branch contains a development mode OpenAPI schema: ${schema.info.version}. This check is a reminder to not 🚢 OpenAPI files in development mode. 🛑`)
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Check that the decorated schema matches the dereferenced schema
|
||||||
|
const changedFiles = execSync('git diff --name-only HEAD').toString()
|
||||||
|
|
||||||
|
if(changedFiles !== '') {
|
||||||
|
console.log(`These files were changed:\n${changedFiles}`)
|
||||||
|
console.log(`🚧⚠️ Your decorated and dereferenced schema files don't match. Ensure you're using decorated and dereferenced schemas from the automatically created pull requests by the 'github-openapi-bot' user. For more information, see 'script/rest/README.md'. 🛑`)
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// All checks pass, ready to ship
|
||||||
|
console.log('All good 👍')
|
||||||
|
process.exit(0)
|
||||||
27
.github/allowed-actions.js
vendored
@@ -4,17 +4,13 @@
|
|||||||
// can be added it this list.
|
// can be added it this list.
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
'actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe',
|
'actions/cache@0781355a23dac32fd3bac414512f4b903437991a', //actions/cache@v2.1.3
|
||||||
'actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16',
|
'actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f', //actions/checkout@v2.3.4
|
||||||
'actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675',
|
'actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9', //actions/script@v3.0.0
|
||||||
'actions/github-script@5d03ada4b0a753e9460b312e61cc4f8fdeacf163',
|
'actions/labeler@5f867a63be70efff62b767459b009290364495eb', //actions/labeler@v2.2.0
|
||||||
'actions/github-script@6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45',
|
'actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d', //actions/setup-node@v1.4.4
|
||||||
'actions/github-script@44b873bc975058192f5279ebe7579496381f575d',
|
'actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526', //actions/setup-ruby@v1.1.2
|
||||||
'actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9',
|
'actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4', //actions/stale@v3.0.13
|
||||||
'actions/labeler@5f867a63be70efff62b767459b009290364495eb',
|
|
||||||
'actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d',
|
|
||||||
'actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526',
|
|
||||||
'actions/stale@44f9eae0adddf72dbf3eedfacc999f70afcec1a8',
|
|
||||||
'crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688',
|
'crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688',
|
||||||
'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911',
|
'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911',
|
||||||
'docker://chinthakagodawita/autoupdate-action:v1',
|
'docker://chinthakagodawita/autoupdate-action:v1',
|
||||||
@@ -25,13 +21,16 @@ module.exports = [
|
|||||||
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
|
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
|
||||||
'juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b',
|
'juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b',
|
||||||
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
|
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
|
||||||
|
'lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8',
|
||||||
'pascalgn/automerge-action@c9bd182',
|
'pascalgn/automerge-action@c9bd182',
|
||||||
'peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5',
|
'peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326',
|
||||||
|
'peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd',
|
||||||
'peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8',
|
'peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8',
|
||||||
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
|
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
|
||||||
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
|
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
|
||||||
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
|
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
|
||||||
'repo-sync/pull-request@ea6773388b83b337e4da9a223293309f2c3670e7',
|
'repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d',
|
||||||
'rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815',
|
'rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815',
|
||||||
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0'
|
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0',
|
||||||
|
'EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575'
|
||||||
]
|
]
|
||||||
|
|||||||
25
.github/workflows/60-days-stale-check.yml
vendored
@@ -1,20 +1,21 @@
|
|||||||
name: 60 Days Stale Check
|
name: 60 Days Stale Check
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "40 16 * * *" # Run each day at 16:40 UTC / 8:40 PST
|
- cron: '40 16 * * *' # Run each day at 16:40 UTC / 8:40 PST
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@44f9eae0adddf72dbf3eedfacc999f70afcec1a8
|
- uses: actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity.'
|
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity.'
|
||||||
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity.'
|
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity.'
|
||||||
days-before-stale: 60
|
days-before-stale: 60
|
||||||
days-before-close: -1
|
days-before-close: -1
|
||||||
only-labels: 'engineering'
|
only-labels: 'engineering'
|
||||||
stale-issue-label: 'stale'
|
stale-issue-label: 'stale'
|
||||||
stale-pr-label: 'stale'
|
stale-pr-label: 'stale'
|
||||||
|
exempt-pr-labels: 'never-stale'
|
||||||
|
exempt-issue-labels: 'never-stale'
|
||||||
|
|||||||
8
.github/workflows/auto-label-prs.yml
vendored
@@ -1,12 +1,12 @@
|
|||||||
name: Auto label Pull Requests
|
name: Auto label Pull Requests
|
||||||
on:
|
on:
|
||||||
- pull_request
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
if: github.repository == 'github/docs-internal'
|
if: github.repository == 'github/docs-internal'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/labeler@5f867a63be70efff62b767459b009290364495eb
|
- uses: actions/labeler@5f867a63be70efff62b767459b009290364495eb
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
|||||||
12
.github/workflows/automerge-dependencies.yml
vendored
@@ -1,8 +1,16 @@
|
|||||||
name: Auto Merge Dependency Updates
|
name: Auto Merge Dependency Updates
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- pull_request
|
pull_request:
|
||||||
- pull_request_review
|
paths:
|
||||||
|
- 'package*.json'
|
||||||
|
- 'Gemfile*'
|
||||||
|
- 'Dockerfile'
|
||||||
|
- '.github/workflows/**'
|
||||||
|
pull_request_review:
|
||||||
|
types:
|
||||||
|
- edited
|
||||||
|
- submitted
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
|
|||||||
20
.github/workflows/automerge.yml
vendored
@@ -23,14 +23,14 @@ jobs:
|
|||||||
if: contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash')
|
if: contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash')
|
||||||
steps:
|
steps:
|
||||||
- name: automerge
|
- name: automerge
|
||||||
uses: "pascalgn/automerge-action@c9bd182"
|
uses: 'pascalgn/automerge-action@c9bd182'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: "${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}"
|
GITHUB_TOKEN: '${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}'
|
||||||
MERGE_METHOD_LABELS: "automerge=merge,autosquash=squash"
|
MERGE_METHOD_LABELS: 'automerge=merge,autosquash=squash'
|
||||||
MERGE_COMMIT_MESSAGE: "pull-request-title"
|
MERGE_COMMIT_MESSAGE: 'pull-request-title'
|
||||||
MERGE_METHOD: "merge"
|
MERGE_METHOD: 'merge'
|
||||||
MERGE_FORKS: "true"
|
MERGE_FORKS: 'true'
|
||||||
MERGE_RETRIES: "50"
|
MERGE_RETRIES: '50'
|
||||||
MERGE_RETRY_SLEEP: "10000" # ten seconds
|
MERGE_RETRY_SLEEP: '10000' # ten seconds
|
||||||
UPDATE_LABELS: "automerge,autosquash"
|
UPDATE_LABELS: 'automerge,autosquash'
|
||||||
UPDATE_METHOD: "merge"
|
UPDATE_METHOD: 'merge'
|
||||||
|
|||||||
2
.github/workflows/browser-test.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
# Even if if doesn't do anything
|
# Even if if doesn't do anything
|
||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
name: Install
|
name: Install
|
||||||
|
|||||||
62
.github/workflows/check-all-english-links.yml
vendored
@@ -1,8 +1,9 @@
|
|||||||
name: Check all English links
|
name: Check all English links
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "40 19 * * *" # once a day at 19:40 UTC / 11:40 PST
|
- cron: '40 19 * * *' # once a day at 19:40 UTC / 11:40 PST
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_all_english_links:
|
check_all_english_links:
|
||||||
@@ -10,27 +11,38 @@ jobs:
|
|||||||
if: github.repository == 'github/docs-internal'
|
if: github.repository == 'github/docs-internal'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
- name: npm ci
|
- name: npm ci
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: npm run build
|
- name: npm run build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
- name: Run script
|
- name: Run script
|
||||||
run: script/check-external-links en > broken_links.md
|
run: |
|
||||||
- name: Check if any broken links
|
script/check-english-links.js > broken_links.md
|
||||||
id: check
|
- if: ${{ failure() }}
|
||||||
run: |
|
name: Get title for issue
|
||||||
if [ "$(grep 'All links are good' broken_links.md)" ]; then
|
id: check
|
||||||
echo ::set-output name=continue::no
|
run: echo "::set-output name=title::$(head -1 broken_links.md)"
|
||||||
else
|
- if: ${{ failure() }}
|
||||||
echo "::set-output name=continue::yes"
|
name: Close previous report
|
||||||
echo "::set-output name=title::$(grep 'found on help.github.com' broken_links.md)"
|
uses: lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8
|
||||||
fi
|
with:
|
||||||
- if: ${{ steps.check.outputs.continue == 'yes' }}
|
query: 'label:"broken link report"'
|
||||||
name: Create issue from file
|
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||||
uses: peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5
|
- if: ${{ failure() }}
|
||||||
with:
|
name: Create issue from file
|
||||||
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
id: broken-link-report
|
||||||
title: ${{ steps.check.outputs.title }}
|
uses: peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326
|
||||||
content-filepath: ./broken_links.md
|
with:
|
||||||
labels: broken link report
|
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||||
|
title: ${{ steps.check.outputs.title }}
|
||||||
|
content-filepath: ./broken_links.md
|
||||||
|
labels: broken link report
|
||||||
|
- if: ${{ failure() }}
|
||||||
|
name: Add comment to issue
|
||||||
|
uses: peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd
|
||||||
|
with:
|
||||||
|
body: |
|
||||||
|
cc @github/docs-content
|
||||||
|
issue-number: ${{ steps.broken-link-report.outputs.issue-number }}
|
||||||
|
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||||
|
|||||||
22
.github/workflows/codeql.yml
vendored
@@ -1,23 +1,19 @@
|
|||||||
name: "CodeQL analysis"
|
name: CodeQL analysis
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- '**/*.js'
|
- '**/*.js'
|
||||||
- '.github/workflows/codeql.yml'
|
- '.github/workflows/codeql.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
- uses: github/codeql-action/init@v1
|
- uses: github/codeql-action/init@v1
|
||||||
with:
|
with:
|
||||||
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp} (not YET ruby, sorry!)
|
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp} (not YET ruby, sorry!)
|
||||||
- uses: github/codeql-action/analyze@v1
|
- uses: github/codeql-action/analyze@v1
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|||||||
6
.github/workflows/crowdin.yml
vendored
@@ -3,7 +3,7 @@ name: Crowdin Sync
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "33 2 * * *" # every day at 2:33 UTC at least until automerge is working
|
- cron: '33 2 * * *' # every day at 2:33 UTC at least until automerge is working
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync_with_crowdin:
|
sync_with_crowdin:
|
||||||
@@ -12,7 +12,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
- name: Sync
|
- name: Sync
|
||||||
uses: crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688
|
uses: crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688
|
||||||
@@ -47,5 +47,3 @@ jobs:
|
|||||||
# See https://crowdin.com/settings#api-key to generate a token
|
# See https://crowdin.com/settings#api-key to generate a token
|
||||||
# This token was created by logging into Crowdin with the octoglot user
|
# This token was created by logging into Crowdin with the octoglot user
|
||||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
31
.github/workflows/dry-run-sync-algolia-search-indices.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
name: (Dry run) Algolia
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
updateIndices:
|
||||||
|
name: (Dry run) Update indices
|
||||||
|
if: github.repository == 'github/docs-internal'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
- uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||||
|
with:
|
||||||
|
node-version: 14.x
|
||||||
|
- name: cache node modules
|
||||||
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
- name: npm ci
|
||||||
|
run: npm ci
|
||||||
|
- name: (Dry run) sync indices
|
||||||
|
env:
|
||||||
|
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
|
||||||
|
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: npm run sync-search-dry-run
|
||||||
151
.github/workflows/first-responder-docs-content.yml
vendored
@@ -1,79 +1,90 @@
|
|||||||
name: First responder docs-content
|
name: First responder docs-content
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [reopened, opened, ready_for_review, unlabeled]
|
types:
|
||||||
|
- reopened
|
||||||
|
- opened
|
||||||
|
- ready_for_review
|
||||||
|
- closed
|
||||||
|
- unlabeled
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
first-responder-triage:
|
first-responder-triage-pr:
|
||||||
if: github.repository == 'github/docs-internal' && github.event.pull_request.draft == false && github.event.action != 'unlabeled'
|
name: Triage PR to FR project board
|
||||||
|
if: github.repository == 'github/docs-internal' && github.event.pull_request.draft == false && github.event.action != 'unlabeled' && github.event.action != 'closed'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check if the event originated from a team member
|
- name: Check if the event originated from a team member
|
||||||
uses: actions/github-script@44b873bc975058192f5279ebe7579496381f575d
|
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||||
id: set-result
|
id: set-result
|
||||||
with:
|
with:
|
||||||
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
|
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
|
||||||
result-encoding: string
|
result-encoding: string
|
||||||
script: |
|
script: |
|
||||||
const repoName = context.payload.repository.name
|
const repoName = context.payload.repository.name
|
||||||
const ownerName = context.payload.repository.owner.login
|
const ownerName = context.payload.repository.owner.login
|
||||||
const issueNumber = (context.eventName === "issues") ? context.payload.issue.number : context.payload.number
|
const issueNumber = (context.eventName === "issues") ? context.payload.issue.number : context.payload.number
|
||||||
const updatedIssueInformation = await github.issues.get({
|
const updatedIssueInformation = await github.issues.get({
|
||||||
owner: ownerName,
|
owner: ownerName,
|
||||||
repo: repoName,
|
repo: repoName,
|
||||||
issue_number: issueNumber
|
issue_number: issueNumber
|
||||||
})
|
})
|
||||||
const teamMembers = await github.request(
|
const teamMembers = await github.request(
|
||||||
`/orgs/github/teams/docs/members`
|
`/orgs/github/teams/docs/members`
|
||||||
)
|
)
|
||||||
const logins = teamMembers.data.map(member => member.login)
|
const logins = teamMembers.data.map(member => member.login)
|
||||||
if (logins.some(login => login === updatedIssueInformation.data.user.login)) {
|
// ignore PRs opened by docs bot accounts
|
||||||
console.log(`This issue or pull request was authored by a member of the github/docs team.`)
|
logins.push('Octomerger', 'octoglot')
|
||||||
return 'true'
|
if (logins.some(login => login === updatedIssueInformation.data.user.login)) {
|
||||||
}
|
console.log(`This issue or pull request was authored by a member of the github/docs team.`)
|
||||||
console.log(`This issue or pull request was authored by an external contributor.`)
|
return 'true'
|
||||||
return 'false'
|
|
||||||
- name: Label external contributor pull requests with docs-content-fr
|
|
||||||
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
|
||||||
if: steps.set-result.outputs.result == 'false'
|
|
||||||
with:
|
|
||||||
repo-token: "${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}"
|
|
||||||
add-labels: "docs-content-fr"
|
|
||||||
- name: Triage to FR PR project column
|
|
||||||
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
|
||||||
if: steps.set-result.outputs.result == 'false'
|
|
||||||
with:
|
|
||||||
action-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
|
||||||
project-url: "https://github.com/orgs/github/projects/1367"
|
|
||||||
column-name: "Docs-internal external contributor PRs"
|
|
||||||
|
|
||||||
first-responder-label-removed:
|
|
||||||
if: github.event.label.name == 'docs-content-fr' && github.event.action == 'unlabeled'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Dump GitHub context
|
|
||||||
env:
|
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
||||||
run: echo "$GITHUB_CONTEXT"
|
|
||||||
- name: Remove card from project
|
|
||||||
uses: actions/github-script@44b873bc975058192f5279ebe7579496381f575d
|
|
||||||
with:
|
|
||||||
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
|
|
||||||
result-encoding: string
|
|
||||||
script: |
|
|
||||||
const issueToRemove = context.payload.number
|
|
||||||
const cards = await github.projects.listCards({
|
|
||||||
column_id: 11130889
|
|
||||||
})
|
|
||||||
cards.data.forEach(card => {
|
|
||||||
if (card.content_url) {
|
|
||||||
const cardIssueNumber = parseInt(card.content_url.split('/').pop(), 10)
|
|
||||||
if (cardIssueNumber === issueToRemove) {
|
|
||||||
const cards = github.projects.deleteCard({
|
|
||||||
card_id: card.id
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
console.log(`This issue or pull request was authored by an external contributor.`)
|
||||||
|
return 'false'
|
||||||
|
- name: Label external contributor pull requests with docs-content-fr
|
||||||
|
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||||
|
if: steps.set-result.outputs.result == 'false'
|
||||||
|
with:
|
||||||
|
repo-token: '${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}'
|
||||||
|
add-labels: 'docs-content-fr'
|
||||||
|
- name: Triage to FR PR project column
|
||||||
|
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
||||||
|
if: steps.set-result.outputs.result == 'false'
|
||||||
|
with:
|
||||||
|
action-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||||
|
project-url: 'https://github.com/orgs/github/projects/1367'
|
||||||
|
column-name: 'Docs-internal external contributor PRs'
|
||||||
|
|
||||||
|
first-responder-remove-pr:
|
||||||
|
name: Remove PR from FR project board
|
||||||
|
if: github.repository == 'github/docs-internal' && ((github.event.label.name == 'docs-content-fr' && github.event.action == 'unlabeled') || github.event.action == 'closed')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Remove card from project
|
||||||
|
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||||
|
with:
|
||||||
|
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
|
||||||
|
result-encoding: string
|
||||||
|
script: |
|
||||||
|
const issueToRemove = context.payload.number
|
||||||
|
const cards = await github.projects.listCards({
|
||||||
|
column_id: 11130889
|
||||||
|
})
|
||||||
|
cards.data.forEach(card => {
|
||||||
|
if (card.content_url) {
|
||||||
|
const cardIssueNumber = parseInt(card.content_url.split('/').pop(), 10)
|
||||||
|
if (cardIssueNumber === issueToRemove) {
|
||||||
|
const cards = github.projects.deleteCard({
|
||||||
|
card_id: card.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
- name: Remove docs-content-fr label if not already removed
|
||||||
|
if: github.event.action == 'closed'
|
||||||
|
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||||
|
with:
|
||||||
|
repo-token: '${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}'
|
||||||
|
remove-labels: 'docs-content-fr'
|
||||||
|
|||||||
59
.github/workflows/js-lint.yml
vendored
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
name: Lint JS
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches-ignore:
|
||||||
|
- translations
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
see_if_should_skip:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
|
steps:
|
||||||
|
- id: skip_check
|
||||||
|
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
|
||||||
|
with:
|
||||||
|
cancel_others: 'false'
|
||||||
|
github_token: ${{ github.token }}
|
||||||
|
paths: '["**/*.js", "package*.json", ".github/workflows/js-lint.yml", ".eslint*"]'
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: see_if_should_skip
|
||||||
|
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
steps:
|
||||||
|
- name: Check out repo
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||||
|
with:
|
||||||
|
node-version: 14.x
|
||||||
|
|
||||||
|
- name: Get npm cache directory
|
||||||
|
id: npm-cache
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
|
with:
|
||||||
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Run linter
|
||||||
|
run: npx eslint .
|
||||||
|
|
||||||
|
- name: Check dependencies
|
||||||
|
run: npm run check-deps
|
||||||
6
.github/workflows/merged-notification.yml
vendored
@@ -1,10 +1,12 @@
|
|||||||
|
name: Merged notification
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: ['closed']
|
types:
|
||||||
|
- 'closed'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
comment:
|
comment:
|
||||||
if: github.event.repository.private == false && github.event.pull_request.merged && github.event.pull_request.base.ref == github.event.repository.default_branch
|
if: github.repository == 'github/docs' && github.event.pull_request.merged && github.event.pull_request.base.ref == github.event.repository.default_branch
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||||
|
|||||||
32
.github/workflows/openapi-decorate.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: OpenAPI generate decorated schema files
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generate-decorated-files:
|
||||||
|
if: github.event.pull_request.user.login == 'github-openapi-bot'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository code
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Decorate the dereferenced OpenAPI schemas
|
||||||
|
run: script/rest/update-files.js --decorate-only
|
||||||
|
|
||||||
|
- name: Check in the decorated files
|
||||||
|
uses: EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575
|
||||||
|
with:
|
||||||
|
# The arguments for the `git add` command
|
||||||
|
add: 'lib/rest/static/decorated'
|
||||||
|
|
||||||
|
# The message for the commit
|
||||||
|
message: 'Add decorated OpenAPI schema files'
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
|
||||||
22
.github/workflows/openapi-schema-check.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: OpenAPI dev mode check
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-schema-versions:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository code
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
# Differences between decorated and dereferenced files indicates a problem
|
||||||
|
- name: Generate decorated files to check that there are no differences
|
||||||
|
run: script/rest/update-files.js --decorate-only
|
||||||
|
|
||||||
|
- name: Check if deref/decorated schemas are dev mode and that they match
|
||||||
|
run: .github/actions-scripts/openapi-schema-branch.js
|
||||||
8
.github/workflows/pa11y.yml
vendored
@@ -1,14 +1,14 @@
|
|||||||
name: "Pa11y"
|
name: Pa11y
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "25 17 * * *" # once a day at 17:25 UTC / 11:50 PST
|
- cron: '25 17 * * *' # once a day at 17:25 UTC / 11:50 PST
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
- name: Check out repo
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
- name: Get npm cache directory
|
- name: Get npm cache directory
|
||||||
id: npm-cache
|
id: npm-cache
|
||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
echo "::set-output name=dir::$(npm config get cache)"
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.npm-cache.outputs.dir }}
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
|||||||
16
.github/workflows/ping-staging-apps.yml
vendored
@@ -2,7 +2,7 @@ name: Ping staging apps
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "*/20 * * * *" # every twenty minutes
|
- cron: '*/20 * * * *' # every twenty minutes
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ping_staging_apps:
|
ping_staging_apps:
|
||||||
@@ -12,10 +12,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }}
|
HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
- name: npm ci
|
- name: npm ci
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: npm run build
|
- name: npm run build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
- name: Run script
|
- name: Run script
|
||||||
run: script/ping-staging-apps.js
|
run: script/ping-staging-apps.js
|
||||||
|
|||||||
81
.github/workflows/remove-unused-assets.yml
vendored
@@ -5,7 +5,7 @@ env:
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "20 15 * * 0" # run every Sunday at 20:15 UTC / 12:15 PST
|
- cron: '20 15 * * 0' # run every Sunday at 20:15 UTC / 12:15 PST
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
remove_unused_assets:
|
remove_unused_assets:
|
||||||
@@ -13,42 +13,43 @@ jobs:
|
|||||||
if: github.repository == 'github/docs-internal'
|
if: github.repository == 'github/docs-internal'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- if: ${{ env.FREEZE == 'true' }}
|
- if: ${{ env.FREEZE == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
echo 'The repo is currently frozen! Exiting this workflow.'
|
echo 'The repo is currently frozen! Exiting this workflow.'
|
||||||
exit 1 # prevents further steps from running
|
exit 1 # prevents further steps from running
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
- name: npm ci
|
- name: npm ci
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Run scripts
|
- name: Run scripts
|
||||||
run: |
|
run: |
|
||||||
script/remove-unused-assets.js > results.md
|
script/remove-unused-assets.js > results.md
|
||||||
script/remove-extraneous-translation-files.js
|
script/remove-extraneous-translation-files.js
|
||||||
- name: Get script results to use in PR body
|
- name: Get script results to use in PR body
|
||||||
id: results
|
id: results
|
||||||
uses: juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512
|
uses: juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512
|
||||||
with:
|
with:
|
||||||
path: ./results.md
|
path: ./results.md
|
||||||
- name: Remove script results file
|
- name: Remove script results file
|
||||||
run: rm -rf ./results.md
|
run: rm -rf ./results.md
|
||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
uses: peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8
|
uses: peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8
|
||||||
with:
|
with:
|
||||||
# need to use a token with repo and workflow scopes for this step
|
# need to use a token with repo and workflow scopes for this step
|
||||||
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||||
commit-message: Action ran script/remove-unused-assets.js
|
commit-message: Action ran script/remove-unused-assets.js
|
||||||
title: Remove unused assets
|
title: Remove unused assets
|
||||||
body: "Hello! This PR removes some files that exist in the repo but are not used in content or data files:\n\n
|
body:
|
||||||
${{ steps.results.outputs.content }}
|
"Hello! This PR removes some files that exist in the repo but are not used in content or data files:\n\n
|
||||||
\n\nIf you have any questions, please contact @github/docs-engineering."
|
${{ steps.results.outputs.content }}
|
||||||
labels: unused assets
|
\n\nIf you have any questions, please contact @github/docs-engineering."
|
||||||
project: Core docs work for the current week
|
labels: unused assets
|
||||||
project-column: Should do
|
project: Core docs work for the current week
|
||||||
branch: remove-unused-assets
|
project-column: Should do
|
||||||
- if: ${{ failure() }}
|
branch: remove-unused-assets
|
||||||
name: Delete remote branch (if previous steps failed)
|
- if: ${{ failure() }}
|
||||||
uses: dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911
|
name: Delete remote branch (if previous steps failed)
|
||||||
with:
|
uses: dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
with:
|
||||||
branches: remove-unused-assets
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
branches: remove-unused-assets
|
||||||
|
|||||||
26
.github/workflows/repo-freeze-check.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Repo Freeze Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- synchronize
|
||||||
|
- ready_for_review
|
||||||
|
- unlocked
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
FREEZE: ${{ secrets.FREEZE }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-freezer:
|
||||||
|
name: Prevent merging during deployment freezes
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Fail if repo merges are paused
|
||||||
|
if: ${{ env.FREEZE == 'true' }}
|
||||||
|
run: |
|
||||||
|
echo 'Merges into the "main" branch on this repo are currently paused!'
|
||||||
|
exit 1
|
||||||
24
.github/workflows/repo-freeze-reminders.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: Repo Freeze Reminders
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '00 11 * * *' # once per day around 11:00am UTC
|
||||||
|
|
||||||
|
env:
|
||||||
|
FREEZE: ${{ secrets.FREEZE }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-freezer:
|
||||||
|
name: Remind about deployment freezes
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.repository == 'github/docs-internal'
|
||||||
|
steps:
|
||||||
|
- name: Send Slack notification if repo is frozen
|
||||||
|
if: ${{ env.FREEZE == 'true' }}
|
||||||
|
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
||||||
|
env:
|
||||||
|
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
||||||
|
SLACK_USERNAME: docs-repo-sync
|
||||||
|
SLACK_ICON_EMOJI: ':freezing_face:'
|
||||||
|
SLACK_COLOR: '#51A0D5' # Carolina Blue
|
||||||
|
SLACK_MESSAGE: All repo-sync runs will fail for ${{ github.repository }} because the repo is currently frozen!
|
||||||
105
.github/workflows/repo-sync.yml
vendored
@@ -8,66 +8,73 @@ name: Repo Sync
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "*/15 * * * *" # every 15 minutes
|
- cron: '*/15 * * * *' # every 15 minutes
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FREEZE: ${{ secrets.FREEZE }}
|
FREEZE: ${{ secrets.FREEZE }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-freezer:
|
||||||
|
name: Check for deployment freezes
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Exit if repo is frozen
|
||||||
|
if: ${{ env.FREEZE == 'true' }}
|
||||||
|
run: |
|
||||||
|
echo 'The repo is currently frozen! Exiting this workflow.'
|
||||||
|
exit 1 # prevents further steps from running
|
||||||
|
|
||||||
repo-sync:
|
repo-sync:
|
||||||
name: Repo Sync
|
name: Repo Sync
|
||||||
|
needs: check-freezer
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Check out repo
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
- name: Exit if repo is frozen
|
- name: Sync repo to branch
|
||||||
if: ${{ env.FREEZE == 'true' }}
|
uses: repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88
|
||||||
run: |
|
env:
|
||||||
echo 'The repo is currently frozen! Exiting this workflow.'
|
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||||
exit 1 # prevents further steps from running
|
with:
|
||||||
|
source_repo: ${{ secrets.SOURCE_REPO }} # https://${access_token}@github.com/github/the-other-repo.git
|
||||||
|
source_branch: main
|
||||||
|
destination_branch: repo-sync
|
||||||
|
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||||
|
|
||||||
- name: Check out repo
|
- name: Create pull request
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
uses: repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||||
|
with:
|
||||||
|
source_branch: repo-sync
|
||||||
|
destination_branch: main
|
||||||
|
pr_title: 'repo sync'
|
||||||
|
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!"
|
||||||
|
pr_label: automerge,autoupdate
|
||||||
|
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||||
|
|
||||||
- name: Sync repo to branch
|
- name: Find pull request
|
||||||
uses: repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88
|
uses: juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b
|
||||||
env:
|
id: find-pull-request
|
||||||
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
with:
|
||||||
with:
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
source_repo: ${{ secrets.SOURCE_REPO }} # https://${access_token}@github.com/github/the-other-repo.git
|
branch: repo-sync
|
||||||
source_branch: main
|
base: main
|
||||||
destination_branch: repo-sync
|
|
||||||
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
|
||||||
|
|
||||||
- name: Create pull request
|
- name: Approve pull request
|
||||||
uses: repo-sync/pull-request@ea6773388b83b337e4da9a223293309f2c3670e7
|
if: ${{ steps.find-pull-request.outputs.number }}
|
||||||
env:
|
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8
|
||||||
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
with:
|
||||||
with:
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
source_branch: repo-sync
|
number: ${{ steps.find-pull-request.outputs.number }}
|
||||||
destination_branch: main
|
|
||||||
pr_title: "repo sync"
|
|
||||||
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!"
|
|
||||||
pr_label: automerge,autoupdate
|
|
||||||
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
|
||||||
|
|
||||||
- name: Find pull request
|
- name: Send Slack notification if workflow fails
|
||||||
uses: juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b
|
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
||||||
id: find-pull-request
|
if: ${{ failure() }}
|
||||||
with:
|
env:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
||||||
branch: repo-sync
|
SLACK_USERNAME: docs-repo-sync
|
||||||
|
SLACK_ICON_EMOJI: ':ohno:'
|
||||||
- name: Approve pull request
|
SLACK_COLOR: '#B90E0A' # Crimson
|
||||||
if: ${{ steps.find-pull-request.outputs.number }}
|
SLACK_MESSAGE: The last repo-sync run for ${{github.repository}} failed. See https://github.com/${{github.repository}}/actions?query=workflow%3A%22Repo+Sync%22
|
||||||
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
number: ${{ steps.find-pull-request.outputs.number }}
|
|
||||||
|
|
||||||
- name: Send Slack notification if workflow fails
|
|
||||||
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
|
||||||
if: failure()
|
|
||||||
env:
|
|
||||||
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
|
||||||
SLACK_MESSAGE: The last repo-sync run for ${{github.repository}} failed. See https://github.com/${{github.repository}}/actions?query=workflow%3A%22Repo+Sync%22
|
|
||||||
|
|||||||
12
.github/workflows/send-eng-issues-to-backlog.yml
vendored
@@ -2,7 +2,9 @@ name: Send Issue to EPD backlog
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [labeled, reopened]
|
types:
|
||||||
|
- labeled
|
||||||
|
- reopened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
@@ -10,10 +12,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
- name: Add issues with engineering label to project board
|
- name: Add issues with engineering label to project board
|
||||||
if: contains(github.event.issue.labels.*.name, 'engineering') || contains(github.event.issue.labels.*.name, 'design') || contains(github.event.issue.labels.*.name, 'Design')
|
if: contains(github.event.issue.labels.*.name, 'engineering') || contains(github.event.issue.labels.*.name, 'design') || contains(github.event.issue.labels.*.name, 'Design')
|
||||||
uses: actions/github-script@44b873bc975058192f5279ebe7579496381f575d
|
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||||
script: |
|
script: |
|
||||||
var column_id = 9659080;
|
var column_id = 9659080;
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
name: Start new engineering PR workflow
|
name: Start new engineering PR workflow
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request_target:
|
||||||
types: [opened, reopened]
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
@@ -12,53 +14,52 @@ jobs:
|
|||||||
DRAFT_COLUMN_ID: 10095775
|
DRAFT_COLUMN_ID: 10095775
|
||||||
REGULAR_COLUMN_ID: 10095779
|
REGULAR_COLUMN_ID: 10095779
|
||||||
steps:
|
steps:
|
||||||
- name:
|
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||||
uses: actions/github-script@44b873bc975058192f5279ebe7579496381f575d
|
continue-on-error: true
|
||||||
continue-on-error: true
|
with:
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||||
script: |
|
script: |
|
||||||
// Only assign the engineering folks
|
// Only assign the engineering folks
|
||||||
try {
|
try {
|
||||||
await github.teams.getMembershipForUserInOrg({
|
await github.teams.getMembershipForUserInOrg({
|
||||||
org: 'github',
|
org: 'github',
|
||||||
team_slug: 'docs-engineering',
|
team_slug: 'docs-engineering',
|
||||||
username: context.payload.sender.login,
|
username: context.payload.sender.login,
|
||||||
});
|
});
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set column ID
|
// Set column ID
|
||||||
const column_id = context.payload.pull_request.draft
|
const column_id = context.payload.pull_request.draft
|
||||||
? process.env.DRAFT_COLUMN_ID
|
? process.env.DRAFT_COLUMN_ID
|
||||||
: process.env.REGULAR_COLUMN_ID
|
: process.env.REGULAR_COLUMN_ID
|
||||||
|
|
||||||
// Try to create the card on the GitHub Project
|
// Try to create the card on the GitHub Project
|
||||||
try {
|
try {
|
||||||
await github.projects.createCard({
|
await github.projects.createCard({
|
||||||
column_id: column_id,
|
column_id: column_id,
|
||||||
content_type: 'PullRequest',
|
content_type: 'PullRequest',
|
||||||
content_id: context.payload.pull_request.id
|
content_id: context.payload.pull_request.id
|
||||||
});
|
});
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Try to set the author as the assignee
|
// Try to set the author as the assignee
|
||||||
const owner = context.payload.repository.owner.login
|
const owner = context.payload.repository.owner.login
|
||||||
const repo = context.payload.repository.name
|
const repo = context.payload.repository.name
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await github.issues.addAssignees({
|
await github.issues.addAssignees({
|
||||||
owner: owner,
|
owner: owner,
|
||||||
repo: repo,
|
repo: repo,
|
||||||
issue_number: context.payload.pull_request.number,
|
issue_number: context.payload.pull_request.number,
|
||||||
assignees: [
|
assignees: [
|
||||||
context.payload.sender.login
|
context.payload.sender.login
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
name: Algolia
|
name: Algolia
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
updateIndices:
|
updateIndices:
|
||||||
@@ -11,29 +12,29 @@ jobs:
|
|||||||
if: github.repository == 'github/docs-internal'
|
if: github.repository == 'github/docs-internal'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
- uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
- uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||||
with:
|
with:
|
||||||
node-version: 14.x
|
node-version: 14.x
|
||||||
- name: cache node modules
|
- name: cache node modules
|
||||||
uses: actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-node-
|
||||||
- name: npm ci
|
- name: npm ci
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: sync indices
|
- name: sync indices
|
||||||
env:
|
env:
|
||||||
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
|
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
|
||||||
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
|
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: npm run sync-search
|
run: npm run sync-search
|
||||||
- name: Send slack notification if workflow run fails
|
- name: Send slack notification if workflow run fails
|
||||||
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
||||||
if: failure()
|
if: failure()
|
||||||
env:
|
env:
|
||||||
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
||||||
SLACK_MESSAGE: The last Algolia workflow run for ${{github.repository}} failed. See https://github.com/github/docs-internal/actions?query=workflow%3AAlgolia
|
SLACK_MESSAGE: The last Algolia workflow run for ${{github.repository}} failed. See https://github.com/github/docs-internal/actions?query=workflow%3AAlgolia
|
||||||
|
|||||||
46
.github/workflows/sync-single-english-algolia-index.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: Algolia Sync Single English Index
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
- unlabeled
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- synchronize
|
||||||
|
- ready_for_review
|
||||||
|
- unlocked
|
||||||
|
|
||||||
|
# This workflow requires a label in the format `sync-english-index-for-<PLAN@RELEASE>`
|
||||||
|
jobs:
|
||||||
|
updateIndices:
|
||||||
|
name: Update English index for single version based on a label's version
|
||||||
|
if: github.repository == 'github/docs-internal'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
- uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||||
|
with:
|
||||||
|
node-version: 14.x
|
||||||
|
- name: cache node modules
|
||||||
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
- name: npm ci
|
||||||
|
run: npm ci
|
||||||
|
- name: Get version from Algolia label if present; only continue if the label is found.
|
||||||
|
id: getVersion
|
||||||
|
run: $GITHUB_WORKSPACE/.github/actions-scripts/enterprise-algolia-label.js
|
||||||
|
- if: ${{ steps.getVersion.outputs.versionToSync }}
|
||||||
|
name: Sync English index for single version
|
||||||
|
env:
|
||||||
|
VERSION: ${{ steps.getVersion.outputs.versionToSync }}
|
||||||
|
LANGUAGE: 'en'
|
||||||
|
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
|
||||||
|
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: npm run sync-search
|
||||||
14
.github/workflows/test-translations.yml
vendored
@@ -4,7 +4,7 @@ name: Node.js Tests - Translations
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "10 20 * * *" # once a day at 20:10 UTC / 12:10 PST
|
- cron: '10 20 * * *' # once a day at 20:10 UTC / 12:10 PST
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
@@ -12,7 +12,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
- name: Check out repo
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
with:
|
with:
|
||||||
ref: translations # check out the 'translations' branch
|
ref: translations # check out the 'translations' branch
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
echo "::set-output name=dir::$(npm config get cache)"
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.npm-cache.outputs.dir }}
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: npx standard
|
run: npx eslint .
|
||||||
|
|
||||||
- name: Check dependencies
|
- name: Check dependencies
|
||||||
run: npm run check-deps
|
run: npm run check-deps
|
||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
test-group: [content, meta, rendering, routing, unit, links-and-images]
|
test-group: [content, meta, rendering, routing, unit, links-and-images]
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
- name: Check out repo
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||||
@@ -65,7 +65,7 @@ jobs:
|
|||||||
echo "::set-output name=dir::$(npm config get cache)"
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.npm-cache.outputs.dir }}
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -77,3 +77,5 @@ jobs:
|
|||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: npx jest tests/${{ matrix.test-group }}/
|
run: npx jest tests/${{ matrix.test-group }}/
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: '--max_old_space_size=4096'
|
||||||
|
|||||||
44
.github/workflows/test-windows.yml
vendored
@@ -5,45 +5,9 @@ name: Node.js Tests - Windows
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "50 19 * * *" # once a day at 19:50 UTC / 11:50 PST
|
- cron: '50 19 * * *' # once a day at 19:50 UTC / 11:50 PST
|
||||||
|
|
||||||
env:
|
|
||||||
CI: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out repo
|
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
|
||||||
|
|
||||||
- name: Setup node
|
|
||||||
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
|
||||||
with:
|
|
||||||
node-version: 14.x
|
|
||||||
|
|
||||||
- name: Get npm cache directory
|
|
||||||
id: npm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=dir::$(npm config get cache)"
|
|
||||||
|
|
||||||
- name: Cache node modules
|
|
||||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
|
||||||
with:
|
|
||||||
path: ${{ steps.npm-cache.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Run linter
|
|
||||||
run: npx standard
|
|
||||||
|
|
||||||
- name: Check dependencies
|
|
||||||
run: npm run check-deps
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
strategy:
|
strategy:
|
||||||
@@ -52,7 +16,7 @@ jobs:
|
|||||||
test-group: [content, meta, rendering, routing, unit, links-and-images]
|
test-group: [content, meta, rendering, routing, unit, links-and-images]
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
- name: Check out repo
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||||
@@ -65,7 +29,7 @@ jobs:
|
|||||||
echo "::set-output name=dir::$(npm config get cache)"
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.npm-cache.outputs.dir }}
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -80,3 +44,5 @@ jobs:
|
|||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: npx jest tests/${{ matrix.test-group }}/
|
run: npx jest tests/${{ matrix.test-group }}/
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: '--max_old_space_size=4096'
|
||||||
|
|||||||
50
.github/workflows/test.yml
vendored
@@ -28,51 +28,11 @@ jobs:
|
|||||||
cancel_others: 'false'
|
cancel_others: 'false'
|
||||||
github_token: ${{ github.token }}
|
github_token: ${{ github.token }}
|
||||||
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"]'
|
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"]'
|
||||||
lint:
|
|
||||||
needs: see_if_should_skip
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
|
|
||||||
# Even if if doesn't do anything
|
|
||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
|
||||||
name: Check out repo
|
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
|
||||||
|
|
||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
|
||||||
name: Setup node
|
|
||||||
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
|
||||||
with:
|
|
||||||
node-version: 14.x
|
|
||||||
|
|
||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
|
||||||
name: Get npm cache directory
|
|
||||||
id: npm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=dir::$(npm config get cache)"
|
|
||||||
|
|
||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
|
||||||
name: Cache node modules
|
|
||||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
|
||||||
with:
|
|
||||||
path: ${{ steps.npm-cache.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-
|
|
||||||
|
|
||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
|
||||||
name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
|
||||||
name: Run linter
|
|
||||||
run: npx standard
|
|
||||||
|
|
||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
|
||||||
name: Check dependencies
|
|
||||||
run: npm run check-deps
|
|
||||||
test:
|
test:
|
||||||
needs: see_if_should_skip
|
needs: see_if_should_skip
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 60
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -82,7 +42,7 @@ jobs:
|
|||||||
# Even if if doesn't do anything
|
# Even if if doesn't do anything
|
||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
name: Check out repo
|
name: Check out repo
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
name: Setup node
|
name: Setup node
|
||||||
@@ -98,7 +58,7 @@ jobs:
|
|||||||
|
|
||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
name: Cache node modules
|
name: Cache node modules
|
||||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.npm-cache.outputs.dir }}
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -116,10 +76,12 @@ jobs:
|
|||||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
name: Run tests
|
name: Run tests
|
||||||
run: npx jest tests/${{ matrix.test-group }}/
|
run: npx jest tests/${{ matrix.test-group }}/
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: '--max_old_space_size=4096'
|
||||||
|
|
||||||
- name: Send Slack notification if workflow fails
|
- name: Send Slack notification if workflow fails
|
||||||
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
||||||
if: failure() && github.ref == 'early-access'
|
if: failure() && github.ref == 'early-access'
|
||||||
env:
|
env:
|
||||||
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
||||||
SLACK_MESSAGE: "Tests are failing on the `early-access` branch. https://github.com/github/docs-internal/tree/early-access"
|
SLACK_MESSAGE: 'Tests are failing on the `early-access` branch. https://github.com/github/docs-internal/tree/early-access'
|
||||||
|
|||||||
86
.github/workflows/translations.yml
vendored
@@ -2,7 +2,7 @@ name: Translations
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "20 19 * * *" # once a day at 19:20 UTC / 11:20 PST
|
- cron: '20 19 * * *' # once a day at 19:20 UTC / 11:20 PST
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FREEZE: ${{ secrets.FREEZE }}
|
FREEZE: ${{ secrets.FREEZE }}
|
||||||
@@ -12,45 +12,45 @@ jobs:
|
|||||||
if: github.repository == 'github/docs-internal'
|
if: github.repository == 'github/docs-internal'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- if: ${{ env.FREEZE == 'true' }}
|
- if: ${{ env.FREEZE == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
echo 'The repo is currently frozen! Exiting this workflow.'
|
echo 'The repo is currently frozen! Exiting this workflow.'
|
||||||
exit 1 # prevents further steps from running
|
exit 1 # prevents further steps from running
|
||||||
- name: Find original Pull Request
|
- name: Find original Pull Request
|
||||||
uses: juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b
|
uses: juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b
|
||||||
id: pr
|
id: pr
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
branch: translations
|
branch: translations
|
||||||
- if: ${{ steps.pr.outputs.number }}
|
- if: ${{ steps.pr.outputs.number }}
|
||||||
name: Check if already labeled
|
name: Check if already labeled
|
||||||
uses: actions/github-script@5d03ada4b0a753e9460b312e61cc4f8fdeacf163
|
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||||
id: has-label
|
id: has-label
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const { data: labels } = await github.issues.listLabelsOnIssue({
|
const { data: labels } = await github.issues.listLabelsOnIssue({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: ${{ steps.pr.outputs.number }}
|
issue_number: ${{ steps.pr.outputs.number }}
|
||||||
})
|
})
|
||||||
if (labels.find(label => label.name === 'automerge')) {
|
if (labels.find(label => label.name === 'automerge')) {
|
||||||
return 'ok'
|
return 'ok'
|
||||||
}
|
}
|
||||||
- if: ${{ !steps.has-label.outputs.result }}
|
- if: ${{ !steps.has-label.outputs.result }}
|
||||||
name: Approve Pull Request
|
name: Approve Pull Request
|
||||||
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8
|
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
number: ${{ steps.pr.outputs.number }}
|
number: ${{ steps.pr.outputs.number }}
|
||||||
- if: ${{ !steps.has-label.outputs.result }}
|
- if: ${{ !steps.has-label.outputs.result }}
|
||||||
name: Add automerge label
|
name: Add automerge label
|
||||||
uses: actions/github-script@5d03ada4b0a753e9460b312e61cc4f8fdeacf163
|
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
github.issues.addLabels({
|
github.issues.addLabels({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: ${{ steps.pr.outputs.number }},
|
issue_number: ${{ steps.pr.outputs.number }},
|
||||||
labels: ['automerge']
|
labels: ['automerge']
|
||||||
})
|
})
|
||||||
|
|||||||
75
.github/workflows/triage-issue-comments.yml
vendored
@@ -1,46 +1,47 @@
|
|||||||
name: Triage new issue comments
|
name: Triage new issue comments
|
||||||
on:
|
on:
|
||||||
issue_comment:
|
issue_comment:
|
||||||
types: [created]
|
types:
|
||||||
|
- created
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage-issue-comments:
|
triage-issue-comments:
|
||||||
if: github.repository == 'github/docs'
|
if: github.repository == 'github/docs' && github.event.issue.pull_request == null
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check if the event originated from a team member
|
- name: Check if the event originated from a team member
|
||||||
uses: actions/github-script@6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45
|
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||||
id: is-internal-contributor
|
id: is-internal-contributor
|
||||||
with:
|
with:
|
||||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||||
result-encoding: string
|
result-encoding: string
|
||||||
script: |
|
script: |
|
||||||
const repo = context.payload.repository.name
|
const repo = context.payload.repository.name
|
||||||
const org = context.payload.repository.owner.login
|
const org = context.payload.repository.owner.login
|
||||||
const actor = context.actor
|
const actor = context.actor
|
||||||
let collaboratorStatus = ''
|
let collaboratorStatus = ''
|
||||||
try {
|
try {
|
||||||
collaboratorStatus = await github.request('GET /repos/{owner}/{repo}/collaborators/{username}', {
|
collaboratorStatus = await github.request('GET /repos/{owner}/{repo}/collaborators/{username}', {
|
||||||
owner: org,
|
owner: org,
|
||||||
repo: repo,
|
repo: repo,
|
||||||
username: actor
|
username: actor
|
||||||
})
|
})
|
||||||
console.log(`This issue was commented on by a Hubber.`)
|
console.log(`This issue was commented on by a Hubber.`)
|
||||||
return 'true'
|
return 'true'
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(`This issue was commented on by an external contributor.`)
|
console.log(`This issue was commented on by an external contributor.`)
|
||||||
return 'false'
|
return 'false'
|
||||||
}
|
}
|
||||||
- name: Label issues with new comments with 'triage'
|
- name: Label issues with new comments with 'triage'
|
||||||
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||||
if: (steps.is-internal-contributor.outputs.result == 'false')
|
if: (steps.is-internal-contributor.outputs.result == 'false')
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
add-labels: "triage"
|
add-labels: 'triage'
|
||||||
- name: Triage to project board
|
- name: Triage to project board
|
||||||
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
||||||
with:
|
with:
|
||||||
action-token: ${{ secrets.GITHUB_TOKEN }}
|
action-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
project-url: "https://github.com/github/docs/projects/1"
|
project-url: 'https://github.com/github/docs/projects/1'
|
||||||
column-name: "Triage"
|
column-name: 'Triage'
|
||||||
|
|||||||
26
.github/workflows/triage-issues.yml
vendored
@@ -1,7 +1,9 @@
|
|||||||
name: Triage new issues
|
name: Triage new issues
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [reopened, opened]
|
types:
|
||||||
|
- reopened
|
||||||
|
- opened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage_issues:
|
triage_issues:
|
||||||
@@ -9,14 +11,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Label new issues with 'triage'
|
- name: Label new issues with 'triage'
|
||||||
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
add-labels: "triage"
|
add-labels: 'triage'
|
||||||
- name: Triage to project board
|
- name: Triage to project board
|
||||||
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
||||||
with:
|
with:
|
||||||
action-token: ${{ secrets.GITHUB_TOKEN }}
|
action-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
project-url: "https://github.com/github/docs/projects/1"
|
project-url: 'https://github.com/github/docs/projects/1'
|
||||||
column-name: "Triage"
|
column-name: 'Triage'
|
||||||
|
|||||||
26
.github/workflows/triage-pull-requests.yml
vendored
@@ -1,7 +1,9 @@
|
|||||||
name: Triage new pull requests
|
name: Triage new pull requests
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [reopened, opened]
|
types:
|
||||||
|
- reopened
|
||||||
|
- opened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage_pulls:
|
triage_pulls:
|
||||||
@@ -9,14 +11,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Label new pull requests with 'triage'
|
- name: Label new pull requests with 'triage'
|
||||||
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
add-labels: "triage"
|
add-labels: 'triage'
|
||||||
- name: Triage to project board
|
- name: Triage to project board
|
||||||
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
||||||
with:
|
with:
|
||||||
action-token: ${{ secrets.GITHUB_TOKEN }}
|
action-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
project-url: "https://github.com/github/docs/projects/1"
|
project-url: 'https://github.com/github/docs/projects/1'
|
||||||
column-name: "Triage"
|
column-name: 'Triage'
|
||||||
|
|||||||
18
.github/workflows/triage-stale-check.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
name: Public Repo Stale Check
|
name: Public Repo Stale Check
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "45 16 * * *" # Run each day at 16:45 UTC / 8:45 PST
|
- cron: '45 16 * * *' # Run each day at 16:45 UTC / 8:45 PST
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
@@ -9,10 +9,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@44f9eae0adddf72dbf3eedfacc999f70afcec1a8
|
- uses: actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-pr-message: 'This PR is stale because it has been open 7 days with no activity and will be automatically closed in 3 days. To keep this PR open, update the PR by adding a comment or pushing a commit.'
|
stale-pr-message: 'This PR is stale because it has been open 7 days with no activity and will be automatically closed in 3 days. To keep this PR open, update the PR by adding a comment or pushing a commit.'
|
||||||
days-before-stale: 7
|
days-before-stale: 7
|
||||||
days-before-close: 10
|
days-before-close: 10
|
||||||
stale-pr-label: 'stale'
|
stale-pr-label: 'stale'
|
||||||
|
exempt-pr-labels: 'never-stale'
|
||||||
|
exempt-issue-labels: 'never-stale'
|
||||||
|
|||||||
109
.github/workflows/update-graphql-files.yml
vendored
@@ -10,63 +10,64 @@ env:
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "20 16 * * *" # run every day at 16:20 UTC / 8:20 PST
|
- cron: '20 16 * * *' # run every day at 16:20 UTC / 8:20 PST
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_graphql_files:
|
update_graphql_files:
|
||||||
if: github.repository == 'github/docs-internal'
|
if: github.repository == 'github/docs-internal'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- if: ${{ env.FREEZE == 'true' }}
|
- if: ${{ env.FREEZE == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
echo 'The repo is currently frozen! Exiting this workflow.'
|
echo 'The repo is currently frozen! Exiting this workflow.'
|
||||||
exit 1 # prevents further steps from running
|
exit 1 # prevents further steps from running
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526
|
uses: actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526
|
||||||
with:
|
with:
|
||||||
ruby-version: '2.4'
|
ruby-version: '2.4'
|
||||||
- name: Install Ruby dependencies
|
- name: Install Ruby dependencies
|
||||||
run: |
|
run: |
|
||||||
gem install bundler
|
gem install bundler
|
||||||
bundle install
|
bundle install
|
||||||
- name: Install Node.js dependencies
|
- name: Install Node.js dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Run updater scripts
|
- name: Run updater scripts
|
||||||
env:
|
env:
|
||||||
# need to use a token from a user with access to github/github for this step
|
# need to use a token from a user with access to github/github for this step
|
||||||
GITHUB_TOKEN: ${{ secrets.ZEKE_PAT_WITH_REPO_AND_WORKFLOW_SCOPE_FOR_REPO_SYNC }}
|
GITHUB_TOKEN: ${{ secrets.ZEKE_PAT_WITH_REPO_AND_WORKFLOW_SCOPE_FOR_REPO_SYNC }}
|
||||||
# technically the changelog should only be updated once per day, but we can safely
|
# technically the changelog should only be updated once per day, but we can safely
|
||||||
# run build-changelog-from-markdown.js in its current form once per hour; when we
|
# run build-changelog-from-markdown.js in its current form once per hour; when we
|
||||||
# rewrite the changelog script, we may need to run it in a separate workflow on a
|
# rewrite the changelog script, we may need to run it in a separate workflow on a
|
||||||
# once-per-day schedule; see details in https://github.com/github/docs-internal/issues/12722.
|
# once-per-day schedule; see details in https://github.com/github/docs-internal/issues/12722.
|
||||||
run: |
|
run: |
|
||||||
script/graphql/update-files.js
|
script/graphql/update-files.js
|
||||||
script/graphql/build-changelog-from-markdown.js
|
script/graphql/build-changelog-from-markdown.js
|
||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
id: create-pull-request
|
id: create-pull-request
|
||||||
uses: peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8
|
uses: peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8
|
||||||
with:
|
with:
|
||||||
# need to use a token with repo and workflow scopes for this step
|
# need to use a token with repo and workflow scopes for this step
|
||||||
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||||
commit-message: 'Action ran graphql scripts "update-files" and "build-changelog-from-markdown"'
|
commit-message: 'Action ran graphql scripts "update-files" and "build-changelog-from-markdown"'
|
||||||
title: GraphQL schema update
|
title: GraphQL schema update
|
||||||
body: "Hello! Some GraphQL data in github/github was updated recently. This PR
|
body:
|
||||||
syncs up the GraphQL data in this repo.\n\n
|
"Hello! Some GraphQL data in github/github was updated recently. This PR
|
||||||
If CI passes, this PR will be auto-merged. :green_heart:\n\n
|
syncs up the GraphQL data in this repo.\n\n
|
||||||
If CI does not pass or other problems arise, contact #docs-engineering on slack."
|
If CI passes, this PR will be auto-merged. :green_heart:\n\n
|
||||||
labels: automerge
|
If CI does not pass or other problems arise, contact #docs-engineering on slack."
|
||||||
branch: graphql-schema-update
|
labels: automerge
|
||||||
- if: ${{ failure() }}
|
branch: graphql-schema-update
|
||||||
name: Delete remote branch (if previous steps failed)
|
- if: ${{ failure() }}
|
||||||
uses: dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911
|
name: Delete remote branch (if previous steps failed)
|
||||||
with:
|
uses: dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
with:
|
||||||
branches: graphql-schema-update
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- if: ${{ steps.create-pull-request.outputs.pr_number }}
|
branches: graphql-schema-update
|
||||||
name: Approve
|
- if: ${{ steps.create-pull-request.outputs.pr_number }}
|
||||||
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8
|
name: Approve
|
||||||
with:
|
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
with:
|
||||||
number: ${{ steps.create-pull-request.outputs.pr_number }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
number: ${{ steps.create-pull-request.outputs.pr_number }}
|
||||||
|
|||||||
56
.github/workflows/yml-lint.yml
vendored
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
name: Lint Yaml
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches-ignore:
|
||||||
|
- translations
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
see_if_should_skip:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
|
steps:
|
||||||
|
- id: skip_check
|
||||||
|
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
|
||||||
|
with:
|
||||||
|
cancel_others: 'false'
|
||||||
|
github_token: ${{ github.token }}
|
||||||
|
paths: '["**/*.yml", "**/*.yaml", "package*.json", ".github/workflows/yml-lint.yml"]'
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: see_if_should_skip
|
||||||
|
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||||
|
steps:
|
||||||
|
- name: Check out repo
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
|
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||||
|
with:
|
||||||
|
node-version: 14.x
|
||||||
|
|
||||||
|
- name: Get npm cache directory
|
||||||
|
id: npm-cache
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||||
|
with:
|
||||||
|
path: ${{ steps.npm-cache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Run linter
|
||||||
|
run: npx prettier -c "**/*.{yml,yaml}"
|
||||||
6
.gitignore
vendored
@@ -4,8 +4,6 @@
|
|||||||
node_modules
|
node_modules
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
coverage
|
coverage
|
||||||
|
.linkinator
|
||||||
# blc: broken link checker
|
broken_links.md
|
||||||
blc_output.log
|
|
||||||
blc_output_internal.log
|
|
||||||
dist
|
dist
|
||||||
1
.prettierignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
translations/
|
||||||
12
.prettierrc.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files":[
|
||||||
|
"**/*.{yml,yaml}"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"singleQuote": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -22,6 +22,7 @@ Examples of unacceptable behavior include:
|
|||||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
* Public or private harassment
|
* Public or private harassment
|
||||||
* Publishing others' private information, such as a physical or email address, without their explicit permission
|
* Publishing others' private information, such as a physical or email address, without their explicit permission
|
||||||
|
* Contacting individual members, contributors, or leaders privately, outside designated community mechanisms, without their explicit permission
|
||||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
|
|
||||||
## Enforcement Responsibilities
|
## Enforcement Responsibilities
|
||||||
|
|||||||
@@ -27,8 +27,13 @@ Fork using GitHub Desktop:
|
|||||||
- Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)!
|
- Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)!
|
||||||
|
|
||||||
Fork using the command line:
|
Fork using the command line:
|
||||||
|
|
||||||
- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.
|
- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.
|
||||||
|
|
||||||
|
Fork with [GitHub Codespaces](https://github.com/features/codespaces):
|
||||||
|
|
||||||
|
- [Fork, edit, and preview](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace) using [GitHub Codespaces](https://github.com/features/codespaces) without having to install and run the project locally.
|
||||||
|
|
||||||
### Make your update:
|
### Make your update:
|
||||||
Make your changes to the file(s) you'd like to update. Here are some tips and tricks for [using the docs codebase](#working-in-the-githubdocs-repository).
|
Make your changes to the file(s) you'd like to update. Here are some tips and tricks for [using the docs codebase](#working-in-the-githubdocs-repository).
|
||||||
- Are you making changes to the application code? You'll need **Node.js v14** to run the site locally. See [contributing/development.md](contributing/development.md).
|
- Are you making changes to the application code? You'll need **Node.js v14** to run the site locally. See [contributing/development.md](contributing/development.md).
|
||||||
@@ -45,7 +50,7 @@ When you're done making changes and you'd like to propose them for review, use t
|
|||||||
### Your PR is merged!
|
### Your PR is merged!
|
||||||
Congratulations! The whole GitHub community thanks you. :sparkles:
|
Congratulations! The whole GitHub community thanks you. :sparkles:
|
||||||
|
|
||||||
Once your PR is merged, you can be added as a contributor in the [readme](README.md#contributors-).
|
Once your PR is merged, you will be proudly listed as a contributor in the [contributor chart](https://github.com/github/docs/graphs/contributors).
|
||||||
|
|
||||||
### Keep contributing as you use GitHub Docs
|
### Keep contributing as you use GitHub Docs
|
||||||
|
|
||||||
@@ -89,7 +94,7 @@ A [pull request](https://docs.github.com/en/github/collaborating-with-issues-and
|
|||||||
When we merge those changes, they should be deployed to the live site within 24 hours. :earth_africa: To learn more about opening a pull request in this repo, see [Opening a pull request](#opening-a-pull-request) below.
|
When we merge those changes, they should be deployed to the live site within 24 hours. :earth_africa: To learn more about opening a pull request in this repo, see [Opening a pull request](#opening-a-pull-request) below.
|
||||||
|
|
||||||
### :question: Support
|
### :question: Support
|
||||||
We are a small team working hard to keep up with the documentation demands of a continously changing product. Unfortunately, we just can't help with support questions in this repository. If you are experiencing a problem with GitHub, unrelated to our documentation, please [contact GitHub Support directly](https://support.github.com/contact). Any issues, discussions, or pull requests opened here requesting support will be given information about how to contact GitHub Support, then closed and locked.
|
We are a small team working hard to keep up with the documentation demands of a continuously changing product. Unfortunately, we just can't help with support questions in this repository. If you are experiencing a problem with GitHub, unrelated to our documentation, please [contact GitHub Support directly](https://support.github.com/contact). Any issues, discussions, or pull requests opened here requesting support will be given information about how to contact GitHub Support, then closed and locked.
|
||||||
|
|
||||||
If you're having trouble with your GitHub account, contact [Support](https://support.github.com/contact).
|
If you're having trouble with your GitHub account, contact [Support](https://support.github.com/contact).
|
||||||
|
|
||||||
@@ -109,7 +114,8 @@ You can browse existing issues to find something that needs help!
|
|||||||
|
|
||||||
### Labels
|
### Labels
|
||||||
Labels can help you find an issue you'd like to help with.
|
Labels can help you find an issue you'd like to help with.
|
||||||
- The [`good-first-issue` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Agood-first-issue) is for problems or updates we think are ideal for beginners.
|
- The [`help wanted` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) is for problems or updates that anyone in the community can start working on.
|
||||||
|
- The [`good first issue` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) is for problems or updates we think are ideal for beginners.
|
||||||
- The [`content` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Acontent) is for problems or updates in the content on docs.github.com. These will usually require some knowledge of Markdown.
|
- The [`content` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Acontent) is for problems or updates in the content on docs.github.com. These will usually require some knowledge of Markdown.
|
||||||
- The [`engineering` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Aengineering) is for problems or updates in the docs.github.com website. These will usually require some knowledge of JavaScript/Node.js or YAML to fix.
|
- The [`engineering` label](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3Aengineering) is for problems or updates in the docs.github.com website. These will usually require some knowledge of JavaScript/Node.js or YAML to fix.
|
||||||
|
|
||||||
@@ -129,7 +135,7 @@ Here's some information that might be helpful while working on a Docs PR:
|
|||||||
|
|
||||||
- [Variables](/data/variables/README.md) - We use variables the same way we use reusables. Variables are for short strings of reusable text.
|
- [Variables](/data/variables/README.md) - We use variables the same way we use reusables. Variables are for short strings of reusable text.
|
||||||
|
|
||||||
- [Liquid](/contribution/liquid-helpers.md) - We use liquid helpers to create different versions of our content.
|
- [Liquid](/contributing/liquid-helpers.md) - We use liquid helpers to create different versions of our content.
|
||||||
|
|
||||||
- [Scripts](/script/README.md) - The scripts directory is the home for all of the scripts you can run locally.
|
- [Scripts](/script/README.md) - The scripts directory is the home for all of the scripts you can run locally.
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ This repository contains the documentation website code and Markdown source file
|
|||||||
GitHub's Docs team works on pre-production content in a private repo that regularly syncs with this public repo.
|
GitHub's Docs team works on pre-production content in a private repo that regularly syncs with this public repo.
|
||||||
|
|
||||||
In this article:
|
In this article:
|
||||||
|
|
||||||
- [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
- [READMEs](#readmes)
|
- [READMEs](#readmes)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
@@ -34,6 +35,7 @@ If you have a solution to one of the open issues, you will need to fork the repo
|
|||||||
We use GitHub Discussions to talk about all sorts of topics related to documentation and this site. For example: if you'd like help troubleshooting a PR, have a great new idea, or want to share something amazing you've learned in our docs, join us in [discussions](https://github.com/github/docs/discussions).
|
We use GitHub Discussions to talk about all sorts of topics related to documentation and this site. For example: if you'd like help troubleshooting a PR, have a great new idea, or want to share something amazing you've learned in our docs, join us in [discussions](https://github.com/github/docs/discussions).
|
||||||
|
|
||||||
#### And that's it!
|
#### And that's it!
|
||||||
|
|
||||||
That's how you can get started easily as a member of the GitHub Documentation community. :sparkles:
|
That's how you can get started easily as a member of the GitHub Documentation community. :sparkles:
|
||||||
|
|
||||||
If you want to know more, or you're making a more complex contribution, check out [Getting Started with Contributing](/CONTRIBUTING.md).
|
If you want to know more, or you're making a more complex contribution, check out [Getting Started with Contributing](/CONTRIBUTING.md).
|
||||||
|
|||||||
BIN
assets/images/actions-log-group.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 18 KiB |
BIN
assets/images/enterprise/business-accounts/pages-tab.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 22 KiB |
BIN
assets/images/enterprise/configuration/ae-idp-configure.png
Normal file
|
After Width: | Height: | Size: 197 KiB |
BIN
assets/images/enterprise/configuration/ae-idp-issuer-url.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 95 KiB |
BIN
assets/images/enterprise/configuration/ae-idp-sign-on-url.png
Normal file
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 16 KiB |
BIN
assets/images/enterprise/configuration/ae-policies-configure.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 124 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 20 KiB |
BIN
assets/images/enterprise/configuration/ae-save.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
assets/images/enterprise/configuration/ae-support-configure.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
assets/images/enterprise/configuration/ae-support-link-url.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 69 KiB |
BIN
assets/images/github-apps/github_apps_callback_url_multiple.png
Normal file
|
After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 123 KiB |
BIN
assets/images/help/codespaces/choose-sku-vscode.png
Normal file
|
After Width: | Height: | Size: 211 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 295 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 383 KiB |
|
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 165 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 545 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 406 KiB |
BIN
assets/images/help/dependabot/dependabot-alert-pr-link.png
Normal file
|
After Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 64 KiB |
BIN
assets/images/help/dependabot/dependabot-tab-view-error-beta.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 88 KiB |
BIN
assets/images/help/desktop/discard-multiple-lines.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
assets/images/help/desktop/discard-single-line.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
assets/images/help/desktop/gear-diff-select.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 61 KiB |
BIN
assets/images/help/enterprises/settings-scim-save.png
Normal file
|
After Width: | Height: | Size: 58 KiB |