Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo sync #1471

Merged
merged 8 commits into from
Nov 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 42 additions & 95 deletions script/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ Usage: script/anonymize-branch.js <new-commit-message> [base-branch] Example: sc
---


### [`archive-enterprise-version.js`](archive-enterprise-version.js)

Run this script during the Enterprise deprecation process to download static copies of all pages for the oldest supported Enterprise version. See the Enterprise deprecation issue template for instructions.

---


### [`backfill-missing-localizations.js`](backfill-missing-localizations.js)

This script copies any English files that are missing from the translations directory into the translations directory. We only need to run this if problems occur with Crowdin's automatic sync.
Expand All @@ -64,11 +57,9 @@ The `ignore` array is for client-side or build-time stuff that doesn't get `requ
---


### [`check-external-links`](check-external-links)

The script is run once per day via a scheduled GitHub Action to check all links in the site. It automatically opens an issue if it finds broken links. To exclude a URL from the link check, add it to `lib/excluded-links.js`.
### [`check-english-links.js`](check-english-links.js)

For checking internal links, see `script/check-internal-links`.
This script runs once per day via a scheduled GitHub Action to check all links in English content, not including deprecated Enterprise Server content. It opens an issue if it finds broken links. To exclude a link, add it to `lib/excluded-links.js`.

---

Expand All @@ -80,37 +71,35 @@ This script is run automatically when you run the server locally. It checks whet
---


### [`check-internal-links`](check-internal-links)

This script wraps tests/links-and-images.js and provides an option to output results to a file.
### [`check-s3-images.js`](check-s3-images.js)

For more information, see `tests/README.md#broken-link-test`.
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).

---


### [`check-s3-images.js`](check-s3-images.js)
### [`content-migrations/extended-markdown-tags.js`](content-migrations/extended-markdown-tags.js)


Run this script in your branch to check whether any images referenced in Enterprise content are not in the 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).

---


### [`content-migrations/extended-markdown-tags.js`](content-migrations/extended-markdown-tags.js)
### [`content-migrations/octicon-tag.js`](content-migrations/octicon-tag.js)



---


### [`content-migrations/octicon-tag.js`](content-migrations/octicon-tag.js)
### [`content-migrations/site-data-tag.js`](content-migrations/site-data-tag.js)



---


### [`content-migrations/site-data-tag.js`](content-migrations/site-data-tag.js)
### [`content-migrations/update-developer-site-links.js`](content-migrations/update-developer-site-links.js)



Expand All @@ -131,9 +120,37 @@ This script finds and lists all the Heroku staging apps and deletes any leftover
---


### [`get-blc-command.js`](get-blc-command.js)
### [`enterprise-server-deprecations/archive-version.js`](enterprise-server-deprecations/archive-version.js)

Run this script during the Enterprise deprecation process to download static copies of all pages for the oldest supported Enterprise version. See the Enterprise deprecation issue template for instructions.

---


### [`enterprise-server-deprecations/remove-version-markup.js`](enterprise-server-deprecations/remove-version-markup.js)

This script parses options for `script/check-external-links`.
Run this script after an Enterprise deprecation to remove Liquid statements and frontmatter that contain the deprecated Enterprise version. See the Enterprise deprecation issue template for instructions.

---


### [`enterprise-server-releases/create-webhooks-for-new-version.js`](enterprise-server-releases/create-webhooks-for-new-version.js)

This script creates new static webhook payload files for a new version.

---


### [`enterprise-server-releases/ghes-to-ghae-versioning.js`](enterprise-server-releases/ghes-to-ghae-versioning.js)

Run this script to add versions frontmatter and Liquid conditionals for GitHub AE, based on anything currently versioned for the provided release of Enterprise Server. This script should be run as part of the Enterprise Server release process.

---


### [`enterprise-server-releases/release-banner.js`](enterprise-server-releases/release-banner.js)

This script creates or removes a release candidate banner for a specified version.

---

Expand Down Expand Up @@ -242,63 +259,6 @@ This script moves reusables out of YAML files into individual Markdown files.
---


### [`new-versioning/fixtures.js`](new-versioning/fixtures.js)



---


### [`new-versioning/main`](new-versioning/main)

All the new versioning!

Usage $ script/new-versioning/main

---


### [`new-versioning/move-admin-dir.js`](new-versioning/move-admin-dir.js)



---


### [`new-versioning/update-content.js`](new-versioning/update-content.js)



---


### [`new-versioning/update-frontmatter.js`](new-versioning/update-frontmatter.js)



---


### [`new-versioning/update-not-fpt-conditionals.js`](new-versioning/update-not-fpt-conditionals.js)

Run this script to update these Liquid conditionals:

{% if currentVersion != 'free-pro-team@latest' %}

to:

{% if enterpriseServerVersions contains currentVersion %}

---


### [`new-versioning/update-products-yml.js`](new-versioning/update-products-yml.js)



---


### [`pages-with-liquid-titles.js`](pages-with-liquid-titles.js)

This is a temporary script to visualize which pages have liquid (and conditionals) in their `title` frontmatter
Expand Down Expand Up @@ -368,20 +328,6 @@ An automated test checks for discrepancies between filenames and [autogenerated
---


### [`release-banner.js`](release-banner.js)

This script creates or removes a release candidate banner for a specified version.


---

### [`remove-deprecated-enterprise-version-markup.js`](remove-deprecated-enterprise-version-markup.js)

Run this script after an Enterprise deprecation to remove Liquid statements and frontmatter that contain the deprecated Enterprise version. See the Enterprise deprecation issue template for instructions.

---


### [`remove-extraneous-translation-files.js`](remove-extraneous-translation-files.js)

An [automated test](/tests/extraneous-translation-files.js) checks for files in the `translations/` directory that do not have an equivalent English file in the `content/` directory, and fails if it finds extraneous files. When the test fails, a human needs to run this script to remove the files.
Expand Down Expand Up @@ -488,9 +434,10 @@ This script is used by other scripts to update temporary AWS credentials and aut
---


### [`upload-enterprise-images-to-s3.js`](upload-enterprise-images-to-s3.js)
### [`upload-images-to-s3.js`](upload-images-to-s3.js)

Run this script to: [upload individual files to S3](https://github.com/github/product-documentation/blob/master/doc-team-workflows/workflow-information-for-all-writers/adding-individual-images-to-earlier-verisons-of-enterprise.md) or: [upload a batch of files to S3 for a new Enterprise release](https://github.com/github/product-documentation/blob/master/doc-team-workflows/working-on-enterprise-releases/information-for-all-writers/storing-a-batch-of-assets-on-s3-for-a-new-release.md). Run `upload-enterprise-images-to-s3.js --help` for usage details.
Use this script to upload individual or batched asset files to a versioned S3 bucket. Run `upload-images-to-s3.js --help` for usage details.

---


Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ const scrape = require('website-scraper')
const program = require('commander')
const rimraf = require('rimraf').sync
const mkdirp = require('mkdirp').sync
const version = require('../lib/enterprise-server-releases').oldestSupported
const version = require('../../lib/enterprise-server-releases').oldestSupported
const archivalRepoName = 'help-docs-archived-enterprise-versions'
const archivalRepoUrl = `https://github.com/github/${archivalRepoName}`
const loadRedirects = require('../lib/redirects/precompile')
const loadRedirects = require('../../lib/redirects/precompile')

// [start-readme]
//
Expand Down Expand Up @@ -95,7 +95,7 @@ async function main () {
}

console.log(`Enterprise version to archive: ${version}`)
const pages = await (require('../lib/pages')())
const pages = await (require('../../lib/pages')())
const permalinksPerVersion = Object.keys(pages)
.filter(key => key.includes(`/enterprise-server@${version}`))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const walk = require('walk-sync')
const matter = require('gray-matter')
const program = require('commander')
const { indexOf, nth } = require('lodash')
const removeLiquidStatements = require('../lib/remove-liquid-statements')
const removeDeprecatedFrontmatter = require('../lib/remove-deprecated-frontmatter')
const enterpriseServerReleases = require('../lib/enterprise-server-releases')
const contentPath = path.join(__dirname, '../content')
const dataPath = path.join(__dirname, '../data')
const removeLiquidStatements = require('../../lib/remove-liquid-statements')
const removeDeprecatedFrontmatter = require('../../lib/remove-deprecated-frontmatter')
const enterpriseServerReleases = require('../../lib/enterprise-server-releases')
const contentPath = path.join(__dirname, '../../content')
const dataPath = path.join(__dirname, '../../data')
const removeUnusedAssetsScript = 'script/remove-unused-assets'
const elseifRegex = /{-?% elsif/

Expand Down Expand Up @@ -62,7 +62,7 @@ const allFiles = contentFiles.concat(dataFiles)

main()
console.log(`\nRunning ${removeUnusedAssetsScript}...`)
require(`../${removeUnusedAssetsScript}`)
require(path.join(process.cwd(), removeUnusedAssetsScript))

function printElseIfFoundWarning (location) {
console.log(`${location} has an 'elsif' condition! Resolve all elsifs by hand, then rerun the script.`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const fs = require('fs')
const mkdirp = require('mkdirp').sync
const path = require('path')
const program = require('commander')
const allVersions = require('../lib/all-versions')
const allVersions = require('../../lib/all-versions')

// [start-readme]
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const fs = require('fs')
const path = require('path')
const program = require('commander')
const yaml = require('js-yaml')
const allVersions = require('../lib/all-versions')
const allVersions = require('../../lib/all-versions')
const releaseCandidateFile = 'data/variables/release_candidate.yml'
const releaseCandidateYaml = path.join(process.cwd(), releaseCandidateFile)

Expand Down
Loading