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
|
||||
|
||||
Before you file an issue read the:
|
||||
- Code of Conduct: https://github.com/github/docs/blob/onboarding/CODE_OF_CONDUCT.md
|
||||
- Contributing guide: https://github.com/github/docs/blob/onboarding/CONTRIBUTING.md
|
||||
- Code of Conduct: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.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
|
||||
-->
|
||||
|
||||
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
|
||||
|
||||
Before you file an issue read the:
|
||||
- Code of Conduct: https://github.com/github/docs/blob/onboarding/CODE_OF_CONDUCT.md
|
||||
- Contributing guide: https://github.com/github/docs/blob/onboarding/CONTRIBUTING.md
|
||||
- Code of Conduct: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.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
|
||||
-->
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -22,6 +22,6 @@ Thanks again!
|
||||
|
||||
### Check off the following:
|
||||
- [ ] 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 [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.
|
||||
|
||||
module.exports = [
|
||||
'actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe',
|
||||
'actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16',
|
||||
'actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675',
|
||||
'actions/github-script@5d03ada4b0a753e9460b312e61cc4f8fdeacf163',
|
||||
'actions/github-script@6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45',
|
||||
'actions/github-script@44b873bc975058192f5279ebe7579496381f575d',
|
||||
'actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9',
|
||||
'actions/labeler@5f867a63be70efff62b767459b009290364495eb',
|
||||
'actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d',
|
||||
'actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526',
|
||||
'actions/stale@44f9eae0adddf72dbf3eedfacc999f70afcec1a8',
|
||||
'actions/cache@0781355a23dac32fd3bac414512f4b903437991a', //actions/cache@v2.1.3
|
||||
'actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f', //actions/checkout@v2.3.4
|
||||
'actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9', //actions/script@v3.0.0
|
||||
'actions/labeler@5f867a63be70efff62b767459b009290364495eb', //actions/labeler@v2.2.0
|
||||
'actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d', //actions/setup-node@v1.4.4
|
||||
'actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526', //actions/setup-ruby@v1.1.2
|
||||
'actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4', //actions/stale@v3.0.13
|
||||
'crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688',
|
||||
'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911',
|
||||
'docker://chinthakagodawita/autoupdate-action:v1',
|
||||
@@ -25,13 +21,16 @@ module.exports = [
|
||||
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
|
||||
'juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b',
|
||||
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
|
||||
'lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8',
|
||||
'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',
|
||||
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
|
||||
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
|
||||
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
|
||||
'repo-sync/pull-request@ea6773388b83b337e4da9a223293309f2c3670e7',
|
||||
'repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d',
|
||||
'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'
|
||||
]
|
||||
|
||||
7
.github/workflows/60-days-stale-check.yml
vendored
@@ -1,13 +1,13 @@
|
||||
name: 60 Days Stale Check
|
||||
on:
|
||||
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:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@44f9eae0adddf72dbf3eedfacc999f70afcec1a8
|
||||
- uses: actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity.'
|
||||
@@ -17,4 +17,5 @@ jobs:
|
||||
only-labels: 'engineering'
|
||||
stale-issue-label: 'stale'
|
||||
stale-pr-label: 'stale'
|
||||
|
||||
exempt-pr-labels: 'never-stale'
|
||||
exempt-issue-labels: 'never-stale'
|
||||
|
||||
4
.github/workflows/auto-label-prs.yml
vendored
@@ -1,6 +1,6 @@
|
||||
name: Auto label Pull Requests
|
||||
on:
|
||||
- pull_request
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
@@ -9,4 +9,4 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/labeler@5f867a63be70efff62b767459b009290364495eb
|
||||
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
|
||||
|
||||
on:
|
||||
- pull_request
|
||||
- pull_request_review
|
||||
pull_request:
|
||||
paths:
|
||||
- 'package*.json'
|
||||
- 'Gemfile*'
|
||||
- 'Dockerfile'
|
||||
- '.github/workflows/**'
|
||||
pull_request_review:
|
||||
types:
|
||||
- edited
|
||||
- submitted
|
||||
|
||||
jobs:
|
||||
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')
|
||||
steps:
|
||||
- name: automerge
|
||||
uses: "pascalgn/automerge-action@c9bd182"
|
||||
uses: 'pascalgn/automerge-action@c9bd182'
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}"
|
||||
MERGE_METHOD_LABELS: "automerge=merge,autosquash=squash"
|
||||
MERGE_COMMIT_MESSAGE: "pull-request-title"
|
||||
MERGE_METHOD: "merge"
|
||||
MERGE_FORKS: "true"
|
||||
MERGE_RETRIES: "50"
|
||||
MERGE_RETRY_SLEEP: "10000" # ten seconds
|
||||
UPDATE_LABELS: "automerge,autosquash"
|
||||
UPDATE_METHOD: "merge"
|
||||
GITHUB_TOKEN: '${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}'
|
||||
MERGE_METHOD_LABELS: 'automerge=merge,autosquash=squash'
|
||||
MERGE_COMMIT_MESSAGE: 'pull-request-title'
|
||||
MERGE_METHOD: 'merge'
|
||||
MERGE_FORKS: 'true'
|
||||
MERGE_RETRIES: '50'
|
||||
MERGE_RETRY_SLEEP: '10000' # ten seconds
|
||||
UPDATE_LABELS: 'automerge,autosquash'
|
||||
UPDATE_METHOD: 'merge'
|
||||
|
||||
2
.github/workflows/browser-test.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
# Even if if doesn't do anything
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Checkout
|
||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Install
|
||||
|
||||
38
.github/workflows/check-all-english-links.yml
vendored
@@ -1,8 +1,9 @@
|
||||
name: Check all English links
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
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:
|
||||
check_all_english_links:
|
||||
@@ -10,27 +11,38 @@ jobs:
|
||||
if: github.repository == 'github/docs-internal'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
- name: npm ci
|
||||
run: npm ci
|
||||
- name: npm run build
|
||||
run: npm run build
|
||||
- name: Run script
|
||||
run: script/check-external-links en > broken_links.md
|
||||
- name: Check if any broken links
|
||||
id: check
|
||||
run: |
|
||||
if [ "$(grep 'All links are good' broken_links.md)" ]; then
|
||||
echo ::set-output name=continue::no
|
||||
else
|
||||
echo "::set-output name=continue::yes"
|
||||
echo "::set-output name=title::$(grep 'found on help.github.com' broken_links.md)"
|
||||
fi
|
||||
- if: ${{ steps.check.outputs.continue == 'yes' }}
|
||||
script/check-english-links.js > broken_links.md
|
||||
- if: ${{ failure() }}
|
||||
name: Get title for issue
|
||||
id: check
|
||||
run: echo "::set-output name=title::$(head -1 broken_links.md)"
|
||||
- if: ${{ failure() }}
|
||||
name: Close previous report
|
||||
uses: lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8
|
||||
with:
|
||||
query: 'label:"broken link report"'
|
||||
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||
- if: ${{ failure() }}
|
||||
name: Create issue from file
|
||||
uses: peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5
|
||||
id: broken-link-report
|
||||
uses: peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326
|
||||
with:
|
||||
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 }}
|
||||
|
||||
8
.github/workflows/codeql.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: "CodeQL analysis"
|
||||
name: CodeQL analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -8,14 +8,10 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
- uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp} (not YET ruby, sorry!)
|
||||
|
||||
6
.github/workflows/crowdin.yml
vendored
@@ -3,7 +3,7 @@ name: Crowdin Sync
|
||||
on:
|
||||
workflow_dispatch:
|
||||
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:
|
||||
sync_with_crowdin:
|
||||
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
|
||||
- name: Sync
|
||||
uses: crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688
|
||||
@@ -47,5 +47,3 @@ jobs:
|
||||
# See https://crowdin.com/settings#api-key to generate a token
|
||||
# This token was created by logging into Crowdin with the octoglot user
|
||||
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
|
||||
@@ -1,16 +1,22 @@
|
||||
name: First responder docs-content
|
||||
on:
|
||||
pull_request:
|
||||
types: [reopened, opened, ready_for_review, unlabeled]
|
||||
types:
|
||||
- reopened
|
||||
- opened
|
||||
- ready_for_review
|
||||
- closed
|
||||
- unlabeled
|
||||
|
||||
jobs:
|
||||
first-responder-triage:
|
||||
if: github.repository == 'github/docs-internal' && github.event.pull_request.draft == false && github.event.action != 'unlabeled'
|
||||
first-responder-triage-pr:
|
||||
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
|
||||
|
||||
steps:
|
||||
- name: Check if the event originated from a team member
|
||||
uses: actions/github-script@44b873bc975058192f5279ebe7579496381f575d
|
||||
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||
id: set-result
|
||||
with:
|
||||
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
|
||||
@@ -28,6 +34,8 @@ jobs:
|
||||
`/orgs/github/teams/docs/members`
|
||||
)
|
||||
const logins = teamMembers.data.map(member => member.login)
|
||||
// ignore PRs opened by docs bot accounts
|
||||
logins.push('Octomerger', 'octoglot')
|
||||
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.`)
|
||||
return 'true'
|
||||
@@ -38,27 +46,24 @@ jobs:
|
||||
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"
|
||||
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"
|
||||
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'
|
||||
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: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
- name: Remove card from project
|
||||
uses: actions/github-script@44b873bc975058192f5279ebe7579496381f575d
|
||||
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||
with:
|
||||
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
|
||||
result-encoding: string
|
||||
@@ -77,3 +82,9 @@ jobs:
|
||||
}
|
||||
}
|
||||
})
|
||||
- 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:
|
||||
pull_request_target:
|
||||
types: ['closed']
|
||||
types:
|
||||
- 'closed'
|
||||
|
||||
jobs:
|
||||
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
|
||||
steps:
|
||||
- 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:
|
||||
workflow_dispatch:
|
||||
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:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
|
||||
- name: Get npm cache directory
|
||||
id: npm-cache
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
4
.github/workflows/ping-staging-apps.yml
vendored
@@ -2,7 +2,7 @@ name: Ping staging apps
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "*/20 * * * *" # every twenty minutes
|
||||
- cron: '*/20 * * * *' # every twenty minutes
|
||||
|
||||
jobs:
|
||||
ping_staging_apps:
|
||||
@@ -12,7 +12,7 @@ jobs:
|
||||
env:
|
||||
HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
- name: npm ci
|
||||
run: npm ci
|
||||
- name: npm run build
|
||||
|
||||
7
.github/workflows/remove-unused-assets.yml
vendored
@@ -5,7 +5,7 @@ env:
|
||||
|
||||
on:
|
||||
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:
|
||||
remove_unused_assets:
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
echo 'The repo is currently frozen! Exiting this workflow.'
|
||||
exit 1 # prevents further steps from running
|
||||
- name: Checkout
|
||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
- name: npm ci
|
||||
run: npm ci
|
||||
- name: Run scripts
|
||||
@@ -39,7 +39,8 @@ jobs:
|
||||
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||
commit-message: Action ran script/remove-unused-assets.js
|
||||
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:
|
||||
"Hello! This PR removes some files that exist in the repo but are not used in content or data files:\n\n
|
||||
${{ steps.results.outputs.content }}
|
||||
\n\nIf you have any questions, please contact @github/docs-engineering."
|
||||
labels: 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!
|
||||
25
.github/workflows/repo-sync.yml
vendored
@@ -8,26 +8,29 @@ name: Repo Sync
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "*/15 * * * *" # every 15 minutes
|
||||
- cron: '*/15 * * * *' # every 15 minutes
|
||||
|
||||
env:
|
||||
FREEZE: ${{ secrets.FREEZE }}
|
||||
|
||||
jobs:
|
||||
repo-sync:
|
||||
name: Repo Sync
|
||||
check-freezer:
|
||||
name: Check for deployment freezes
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
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:
|
||||
name: Repo Sync
|
||||
needs: check-freezer
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
|
||||
- name: Sync repo to branch
|
||||
uses: repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88
|
||||
@@ -40,13 +43,13 @@ jobs:
|
||||
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||
|
||||
- name: Create pull request
|
||||
uses: repo-sync/pull-request@ea6773388b83b337e4da9a223293309f2c3670e7
|
||||
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_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 }}
|
||||
@@ -57,6 +60,7 @@ jobs:
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: repo-sync
|
||||
base: main
|
||||
|
||||
- name: Approve pull request
|
||||
if: ${{ steps.find-pull-request.outputs.number }}
|
||||
@@ -67,7 +71,10 @@ jobs:
|
||||
|
||||
- name: Send Slack notification if workflow fails
|
||||
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
||||
if: failure()
|
||||
if: ${{ failure() }}
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
||||
SLACK_USERNAME: docs-repo-sync
|
||||
SLACK_ICON_EMOJI: ':ohno:'
|
||||
SLACK_COLOR: '#B90E0A' # Crimson
|
||||
SLACK_MESSAGE: The last repo-sync run for ${{github.repository}} failed. See https://github.com/${{github.repository}}/actions?query=workflow%3A%22Repo+Sync%22
|
||||
|
||||
@@ -2,7 +2,9 @@ name: Send Issue to EPD backlog
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled, reopened]
|
||||
types:
|
||||
- labeled
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
@@ -12,7 +14,7 @@ jobs:
|
||||
steps:
|
||||
- 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')
|
||||
uses: actions/github-script@44b873bc975058192f5279ebe7579496381f575d
|
||||
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||
with:
|
||||
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||
script: |
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
name: Start new engineering PR workflow
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened]
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
@@ -12,8 +14,7 @@ jobs:
|
||||
DRAFT_COLUMN_ID: 10095775
|
||||
REGULAR_COLUMN_ID: 10095779
|
||||
steps:
|
||||
- name:
|
||||
uses: actions/github-script@44b873bc975058192f5279ebe7579496381f575d
|
||||
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||
continue-on-error: true
|
||||
with:
|
||||
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
name: Algolia
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
@@ -12,12 +13,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
- uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||
with:
|
||||
node-version: 14.x
|
||||
- name: cache node modules
|
||||
uses: actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
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:
|
||||
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:
|
||||
lint:
|
||||
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
with:
|
||||
ref: translations # check out the 'translations' branch
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
run: npm ci
|
||||
|
||||
- name: Run linter
|
||||
run: npx standard
|
||||
run: npx eslint .
|
||||
|
||||
- name: Check dependencies
|
||||
run: npm run check-deps
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
test-group: [content, meta, rendering, routing, unit, links-and-images]
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
@@ -77,3 +77,5 @@ jobs:
|
||||
|
||||
- name: Run tests
|
||||
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:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "50 19 * * *" # once a day at 19:50 UTC / 11:50 PST
|
||||
|
||||
env:
|
||||
CI: true
|
||||
- cron: '50 19 * * *' # once a day at 19:50 UTC / 11:50 PST
|
||||
|
||||
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:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
@@ -52,7 +16,7 @@ jobs:
|
||||
test-group: [content, meta, rendering, routing, unit, links-and-images]
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||
@@ -65,7 +29,7 @@ jobs:
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
@@ -80,3 +44,5 @@ jobs:
|
||||
|
||||
- name: Run tests
|
||||
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'
|
||||
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"]'
|
||||
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:
|
||||
needs: see_if_should_skip
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -82,7 +42,7 @@ jobs:
|
||||
# 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
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Setup node
|
||||
@@ -98,7 +58,7 @@ jobs:
|
||||
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
@@ -116,10 +76,12 @@ jobs:
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Run tests
|
||||
run: npx jest tests/${{ matrix.test-group }}/
|
||||
env:
|
||||
NODE_OPTIONS: '--max_old_space_size=4096'
|
||||
|
||||
- name: Send Slack notification if workflow fails
|
||||
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
||||
if: failure() && github.ref == 'early-access'
|
||||
env:
|
||||
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'
|
||||
|
||||
6
.github/workflows/translations.yml
vendored
@@ -2,7 +2,7 @@ name: Translations
|
||||
|
||||
on:
|
||||
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:
|
||||
FREEZE: ${{ secrets.FREEZE }}
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
branch: translations
|
||||
- if: ${{ steps.pr.outputs.number }}
|
||||
name: Check if already labeled
|
||||
uses: actions/github-script@5d03ada4b0a753e9460b312e61cc4f8fdeacf163
|
||||
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||
id: has-label
|
||||
with:
|
||||
script: |
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
number: ${{ steps.pr.outputs.number }}
|
||||
- if: ${{ !steps.has-label.outputs.result }}
|
||||
name: Add automerge label
|
||||
uses: actions/github-script@5d03ada4b0a753e9460b312e61cc4f8fdeacf163
|
||||
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
|
||||
15
.github/workflows/triage-issue-comments.yml
vendored
@@ -1,16 +1,17 @@
|
||||
name: Triage new issue comments
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
types:
|
||||
- created
|
||||
|
||||
jobs:
|
||||
triage-issue-comments:
|
||||
if: github.repository == 'github/docs'
|
||||
if: github.repository == 'github/docs' && github.event.issue.pull_request == null
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check if the event originated from a team member
|
||||
uses: actions/github-script@6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45
|
||||
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
|
||||
id: is-internal-contributor
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
@@ -36,11 +37,11 @@ jobs:
|
||||
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||
if: (steps.is-internal-contributor.outputs.result == 'false')
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
add-labels: "triage"
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
add-labels: 'triage'
|
||||
- name: Triage to project board
|
||||
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
||||
with:
|
||||
action-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
project-url: "https://github.com/github/docs/projects/1"
|
||||
column-name: "Triage"
|
||||
project-url: 'https://github.com/github/docs/projects/1'
|
||||
column-name: 'Triage'
|
||||
|
||||
12
.github/workflows/triage-issues.yml
vendored
@@ -1,7 +1,9 @@
|
||||
name: Triage new issues
|
||||
on:
|
||||
issues:
|
||||
types: [reopened, opened]
|
||||
types:
|
||||
- reopened
|
||||
- opened
|
||||
|
||||
jobs:
|
||||
triage_issues:
|
||||
@@ -12,11 +14,11 @@ jobs:
|
||||
- name: Label new issues with 'triage'
|
||||
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
add-labels: "triage"
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
add-labels: 'triage'
|
||||
- name: Triage to project board
|
||||
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
||||
with:
|
||||
action-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
project-url: "https://github.com/github/docs/projects/1"
|
||||
column-name: "Triage"
|
||||
project-url: 'https://github.com/github/docs/projects/1'
|
||||
column-name: 'Triage'
|
||||
|
||||
12
.github/workflows/triage-pull-requests.yml
vendored
@@ -1,7 +1,9 @@
|
||||
name: Triage new pull requests
|
||||
on:
|
||||
pull_request:
|
||||
types: [reopened, opened]
|
||||
types:
|
||||
- reopened
|
||||
- opened
|
||||
|
||||
jobs:
|
||||
triage_pulls:
|
||||
@@ -12,11 +14,11 @@ jobs:
|
||||
- name: Label new pull requests with 'triage'
|
||||
uses: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
add-labels: "triage"
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
add-labels: 'triage'
|
||||
- name: Triage to project board
|
||||
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9
|
||||
with:
|
||||
action-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
project-url: "https://github.com/github/docs/projects/1"
|
||||
column-name: "Triage"
|
||||
project-url: 'https://github.com/github/docs/projects/1'
|
||||
column-name: 'Triage'
|
||||
|
||||
6
.github/workflows/triage-stale-check.yml
vendored
@@ -1,7 +1,7 @@
|
||||
name: Public Repo Stale Check
|
||||
on:
|
||||
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:
|
||||
stale:
|
||||
@@ -9,10 +9,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@44f9eae0adddf72dbf3eedfacc999f70afcec1a8
|
||||
- uses: actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4
|
||||
with:
|
||||
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.'
|
||||
days-before-stale: 7
|
||||
days-before-close: 10
|
||||
stale-pr-label: 'stale'
|
||||
exempt-pr-labels: 'never-stale'
|
||||
exempt-issue-labels: 'never-stale'
|
||||
|
||||
7
.github/workflows/update-graphql-files.yml
vendored
@@ -10,7 +10,7 @@ env:
|
||||
|
||||
on:
|
||||
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:
|
||||
update_graphql_files:
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
echo 'The repo is currently frozen! Exiting this workflow.'
|
||||
exit 1 # prevents further steps from running
|
||||
- name: Checkout
|
||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
- name: Set up Ruby
|
||||
uses: actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526
|
||||
with:
|
||||
@@ -52,7 +52,8 @@ jobs:
|
||||
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||
commit-message: 'Action ran graphql scripts "update-files" and "build-changelog-from-markdown"'
|
||||
title: GraphQL schema update
|
||||
body: "Hello! Some GraphQL data in github/github was updated recently. This PR
|
||||
body:
|
||||
"Hello! Some GraphQL data in github/github was updated recently. This PR
|
||||
syncs up the GraphQL data in this repo.\n\n
|
||||
If CI passes, this PR will be auto-merged. :green_heart:\n\n
|
||||
If CI does not pass or other problems arise, contact #docs-engineering on slack."
|
||||
|
||||
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
|
||||
npm-debug.log
|
||||
coverage
|
||||
|
||||
# blc: broken link checker
|
||||
blc_output.log
|
||||
blc_output_internal.log
|
||||
.linkinator
|
||||
broken_links.md
|
||||
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
|
||||
* Public or private harassment
|
||||
* 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
|
||||
|
||||
## 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)!
|
||||
|
||||
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 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 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).
|
||||
@@ -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!
|
||||
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
|
||||
|
||||
@@ -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.
|
||||
|
||||
### :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).
|
||||
|
||||
@@ -109,7 +114,8 @@ You can browse existing issues to find something that needs help!
|
||||
|
||||
### Labels
|
||||
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 [`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.
|
||||
|
||||
- [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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
In this article:
|
||||
|
||||
- [Contributing](#contributing)
|
||||
- [READMEs](#readmes)
|
||||
- [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).
|
||||
|
||||
#### And that's it!
|
||||
|
||||
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).
|
||||
|
||||
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 |