Merge branch 'main' of github.com:github/docs-internal into hidden-docs-alt
This commit is contained in:
@@ -73,7 +73,7 @@ This script is run automatically when you run the server locally. It checks whet
|
||||
|
||||
### [`check-s3-images.js`](check-s3-images.js)
|
||||
|
||||
Run this script in your branch to check whether any images referenced in content are not in an expected S3 bucket. You will need to authenticate to S3 via `awssume` to use this script. Instructions for the one-time setup are [here](https://github.com/github/product-documentation/blob/master/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md).
|
||||
Run this script in your branch to check whether any images referenced in content are not in an expected S3 bucket. You will need to authenticate to S3 via `awssume` to use this script.
|
||||
|
||||
---
|
||||
|
||||
@@ -304,14 +304,14 @@ This script is run as a git precommit hook (installed by husky after npm install
|
||||
|
||||
### [`purge-fastly`](purge-fastly)
|
||||
|
||||
Run this script to manually purge the [Fastly cache](https://github.com/github/docs-internal#fastly-cdn). Note this script requires a `FASTLY_SERVICE_ID` and `FASTLY_TOKEN` in your `.env` file.
|
||||
Run this script to manually purge the Fastly cache. Note this script requires a `FASTLY_SERVICE_ID` and `FASTLY_TOKEN` in your `.env` file.
|
||||
|
||||
---
|
||||
|
||||
|
||||
### [`purge-fastly-by-url.js`](purge-fastly-by-url.js)
|
||||
|
||||
Run this script to manually purge the [Fastly cache](https://github.com/github/docs-internal#fastly-cdn) for all language variants of a single URL or for a batch of URLs in a file. This script does not require authentication.
|
||||
Run this script to manually purge the Fastly cache for all language variants of a single URL or for a batch of URLs in a file. This script does not require authentication.
|
||||
|
||||
---
|
||||
|
||||
@@ -362,11 +362,11 @@ Examples:
|
||||
|
||||
reset a single translated file using a relative path: $ script/reset-translated-file.js translations/es-XL/content/actions/index.md
|
||||
|
||||
reset a single translated file using a full path: $ script/reset-translated-file.js /Users/z/git/github/docs-internal/translations/es-XL/content/actions/index.md
|
||||
reset a single translated file using a full path: $ script/reset-translated-file.js /Users/z/git/github/docs/translations/es-XL/content/actions/index.md
|
||||
|
||||
reset all language variants of a single English file (using a relative path): $ script/reset-translated-file.js content/actions/index.md $ script/reset-translated-file.js data/ui.yml
|
||||
|
||||
reset all language variants of a single English file (using a full path): $ script/reset-translated-file.js /Users/z/git/github/docs-internal/content/desktop/index.md $ script/reset-translated-file.js /Users/z/git/github/docs-internal/data/ui.yml
|
||||
reset all language variants of a single English file (using a full path): $ script/reset-translated-file.js /Users/z/git/github/docs/content/desktop/index.md $ script/reset-translated-file.js /Users/z/git/github/docs/data/ui.yml
|
||||
|
||||
---
|
||||
|
||||
@@ -422,7 +422,7 @@ Starts the local development server with all of the available languages enabled.
|
||||
|
||||
### [`standardize-frontmatter-order.js`](standardize-frontmatter-order.js)
|
||||
|
||||
Run this script to standardize frontmatter fields in all content files, per the order decided in https://github.com/github/docs-internal/issues/9658#issuecomment-485536265.
|
||||
Run this script to standardize frontmatter fields in all content files.
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +443,7 @@ List all the TODOs in our JavaScript files and stylesheets.
|
||||
|
||||
### [`update-enterprise-dates.js`](update-enterprise-dates.js)
|
||||
|
||||
Run this script during Enterprise releases and deprecations. It uses the GitHub API to get dates from [`enterprise-releases`](https://github.com/github/enterprise-releases/blob/master/releases.json) and updates `lib/enterprise-dates.json`. The help site uses this JSON to display dates at the top of some Enterprise versions.
|
||||
Run this script during Enterprise releases and deprecations. It uses the GitHub API to get dates from `enterprise-releases` and updates `lib/enterprise-dates.json`. The help site uses this JSON to display dates at the top of some Enterprise versions.
|
||||
|
||||
This script requires that you have a GitHub Personal Access Token in a `.env` file. If you don't have a token, get one [here](https://github.com/settings/tokens/new?scopes=repo&description=docs-dev). If you don't have an `.env` file in your docs checkout, run this command in Terminal:
|
||||
|
||||
@@ -465,7 +465,7 @@ This script crawls the script directory, hooks on special comment markers in eac
|
||||
|
||||
### [`update-s3cmd-config.js`](update-s3cmd-config.js)
|
||||
|
||||
This script is used by other scripts to update temporary AWS credentials and authenticate to S3. See docs at [Setting up awssume and S3cmd](https://github.com/github/product-documentation/tree/master/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md).
|
||||
This script is used by other scripts to update temporary AWS credentials and authenticate to S3.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ const versionsToCheck = Object.keys(allVersions)
|
||||
//
|
||||
// Run this script in your branch to check whether any images referenced in content are
|
||||
// not in an expected S3 bucket. You will need to authenticate to S3 via `awssume` to use this script.
|
||||
// Instructions for the one-time setup are [here](https://github.com/github/product-documentation/blob/master/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md).
|
||||
// Instructions for the one-time setup are at docs-content/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md
|
||||
//
|
||||
// [end-readme]
|
||||
|
||||
|
||||
@@ -180,7 +180,6 @@ async function createRedirectPages (permalinks, pages, finalDirectory) {
|
||||
console.log('done creating redirect files!\n')
|
||||
}
|
||||
|
||||
// prior art: https://github.com/github/help-docs-archived-enterprise-versions/blob/master/2.12/user/leave-a-repo/index.html
|
||||
// redirect html files already exist in <=2.12 because these versions were deprecated on the old static site
|
||||
function getRedirectHtml (newPath) {
|
||||
return `<!DOCTYPE html>
|
||||
|
||||
@@ -9,4 +9,4 @@ These scripts update the [static JSON files](../../lib/graphql/static) used to
|
||||
render GraphQL docs. See the [`lib/graphql/README`](../../lib/graphql/README.md)
|
||||
for more info.
|
||||
|
||||
**Note**: The changelog script pulls content from [the internal-developer repo](https://github.com/github/internal-developer.github.com/tree/master/content/v4/changelog). It relies on [graphql-docs automation](https://github.com/github/graphql-docs/blob/master/lib/graphql_docs/update_internal_developer/change_log.rb) running daily to update the changelog files in internal-developer.
|
||||
**Note**: The changelog script pulls content from the internal-developer repo. It relies on graphql-docs automation running daily to update the changelog files in internal-developer.
|
||||
|
||||
@@ -127,7 +127,7 @@ function cleanPreviewTitle (title) {
|
||||
|
||||
/**
|
||||
* Turn the given title into an HTML-ready anchor.
|
||||
* (ported from https://github.com/github/graphql-docs/blob/master/lib/graphql_docs/update_internal_developer/change_log.rb#L281)
|
||||
* (ported from graphql-docs/lib/graphql_docs/update_internal_developer/change_log.rb#L281)
|
||||
* @param {string} [previewTitle]
|
||||
* @return {string}
|
||||
*/
|
||||
@@ -155,7 +155,7 @@ function cleanMessagesFromChanges (changes) {
|
||||
* Split `changesToReport` into two parts,
|
||||
* one for changes in the main schema,
|
||||
* and another for changes that are under preview.
|
||||
* (Ported from https://github.com/github/graphql-docs/blob/7e6a5ccbf13cc7d875fee65527b25bc49e886b41/lib/graphql_docs/update_internal_developer/change_log.rb#L230)
|
||||
* (Ported from /graphql-docs/lib/graphql_docs/update_internal_developer/change_log.rb#L230)
|
||||
* @param {Array<object>} changesToReport
|
||||
* @param {object} previews
|
||||
* @return {object}
|
||||
@@ -203,7 +203,7 @@ function segmentPreviewChanges (changesToReport, previews) {
|
||||
// Deprecations are covered by "upcoming changes."
|
||||
// By listing the changes explicitly here, we can make sure that,
|
||||
// if the library changes, we don't miss publishing anything that we mean to.
|
||||
// This was originally ported from https://github.com/github/graphql-docs/blob/7e6a5ccbf13cc7d875fee65527b25bc49e886b41/lib/graphql_docs/update_internal_developer/change_log.rb#L35-L103
|
||||
// This was originally ported from graphql-docs/lib/graphql_docs/update_internal_developer/change_log.rb#L35-L103
|
||||
const CHANGES_TO_REPORT = [
|
||||
ChangeType.FieldArgumentDefaultChanged,
|
||||
ChangeType.FieldArgumentTypeChanged,
|
||||
|
||||
@@ -8,7 +8,7 @@ if ARGV.empty?
|
||||
exit 1
|
||||
end
|
||||
|
||||
# borrowed from https://github.com/github/graphql-docs/blob/master/lib/graphql_docs/update_internal_developer/idl.rb
|
||||
# borrowed from graphql-docs/lib/graphql_docs/update_internal_developer/idl.rb
|
||||
class Printer < GraphQL::Language::DocumentFromSchemaDefinition
|
||||
def build_object_type_node(object_type)
|
||||
apply_directives_to_node(object_type, super)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# [start-readme]
|
||||
#
|
||||
# Run this script to manually purge the [Fastly cache](https://github.com/github/docs-internal#fastly-cdn).
|
||||
# Run this script to manually purge the Fastly cache.
|
||||
# Note this script requires a `FASTLY_SERVICE_ID` and `FASTLY_TOKEN` in your `.env` file.
|
||||
#
|
||||
# [end-readme]
|
||||
|
||||
@@ -9,7 +9,7 @@ const { getPathWithoutLanguage } = require('../lib/path-utils')
|
||||
|
||||
// [start-readme]
|
||||
//
|
||||
// Run this script to manually purge the [Fastly cache](https://github.com/github/docs-internal#fastly-cdn)
|
||||
// Run this script to manually purge the Fastly cache
|
||||
// for all language variants of a single URL or for a batch of URLs in a file. This script does
|
||||
// not require authentication.
|
||||
//
|
||||
|
||||
@@ -14,7 +14,15 @@ const contentFiles = walk(contentDir, { includeBasePath: true })
|
||||
// [start-readme]
|
||||
//
|
||||
// Run this script to standardize frontmatter fields in all content files,
|
||||
// per the order decided in https://github.com/github/docs-internal/issues/9658#issuecomment-485536265.
|
||||
// per the order:
|
||||
// - title
|
||||
// - intro
|
||||
// - product callout
|
||||
// - productVersion
|
||||
// - map topic status
|
||||
// - hidden status
|
||||
// - layout
|
||||
// - redirect
|
||||
//
|
||||
// [end-readme]
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ const jsonFile = require(filename)
|
||||
// [start-readme]
|
||||
//
|
||||
// Run this script during Enterprise releases and deprecations.
|
||||
// It uses the GitHub API to get dates from [`enterprise-releases`](https://github.com/github/enterprise-releases/blob/master/releases.json) and updates `lib/enterprise-dates.json`.
|
||||
// It uses the GitHub API to get dates from enterprise-releases and updates `lib/enterprise-dates.json`.
|
||||
// The help site uses this JSON to display dates at the top of some Enterprise versions.
|
||||
//
|
||||
// This script requires that you have a GitHub Personal Access Token in a `.env` file.
|
||||
@@ -26,8 +26,7 @@ const jsonFile = require(filename)
|
||||
|
||||
main()
|
||||
|
||||
// GHE Release Lifecycle Dates:
|
||||
// https://github.com/github/enterprise-releases/blob/master/releases.json
|
||||
// GHE Release Lifecycle Dates
|
||||
async function main () {
|
||||
let raw
|
||||
try {
|
||||
@@ -38,7 +37,7 @@ async function main () {
|
||||
}
|
||||
const json = prepareData(raw)
|
||||
if (json === prettify(jsonFile)) {
|
||||
console.log('This repo is already in sync with https://github.com/github/enterprise-releases/blob/master/releases.json!')
|
||||
console.log('This repo is already in sync with enterprise-releases!')
|
||||
} else {
|
||||
fs.writeFileSync(filename, json, 'utf8')
|
||||
console.log(`${filename} has been updated!`)
|
||||
|
||||
@@ -5,7 +5,6 @@ const authenticateToAWS = require('../lib/authenticate-to-aws.js')
|
||||
// [start-readme]
|
||||
//
|
||||
// This script is used by other scripts to update temporary AWS credentials and authenticate to S3.
|
||||
// See docs at [Setting up awssume and S3cmd](https://github.com/github/product-documentation/tree/master/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md).
|
||||
//
|
||||
// [end-readme]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user