Skip to content

update scripts/README.md #117

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

Merged
merged 4 commits into from
Oct 7, 2020
Merged
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
124 changes: 113 additions & 11 deletions script/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,27 @@ Run this script in your branch to check whether any images referenced in Enterpr
---


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



---


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



---


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



---


### [`create-glossary-from-spreadsheet.js`](create-glossary-from-spreadsheet.js)

This script turns a Google Sheets CSV spreadsheet into a YAML file.
Expand Down Expand Up @@ -115,6 +136,19 @@ Pass this script any old dotcom path (e.g., `articles/foo` or `foo.md`) and it w
---


### [`get-new-version-path.js`](get-new-version-path.js)

Helper script that returns a "new" versioned path given an "old" versioned path.

Examples:

Given: /github/getting-started-with-github/using-github Returns: /free-pro-team@latest/github/getting-started-with-github/using-github

Given: /enterprise/admin/installation/upgrading-github-enterprise Returns: /[email protected]/admin/installation/upgrading-github-enterprise

---


### [`graphql/build-changelog-from-markdown.js`](graphql/build-changelog-from-markdown.js)


Expand Down Expand Up @@ -199,16 +233,67 @@ 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-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

---


### [`prevent-pushes-to-master.js`](prevent-pushes-to-master.js)
### [`ping-staging-apps.js`](ping-staging-apps.js)

This script is intended to be used as a git "prepush" hook. If the current branch is master, it will exit unsuccesfully and prevent the push.
This script finds all Heroku staging apps and pings them to make sure they're always "warmed" and responsive to requests.

---


### [`prevent-pushes-to-main.js`](prevent-pushes-to-main.js)

This script is intended to be used as a git "prepush" hook. If the current branch is main, it will exit unsuccesfully and prevent the push.

---

Expand All @@ -220,6 +305,13 @@ This script is run as a git precommit hook (installed by husky after npm install
---


### [`preview-openapi-changes`](preview-openapi-changes)



---


### [`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.
Expand All @@ -234,26 +326,29 @@ Run this script to manually purge the [Fastly cache](https://github.com/github/d
---


### [`reconcile-filenames-with-ids.js`](reconcile-filenames-with-ids.js)
### [`reconcile-category-dirs-with-ids.js`](reconcile-category-dirs-with-ids.js)

An automated test checks for discrepancies between filenames and [autogenerated heading IDs](https://www.npmjs.com/package/remark-autolink-headings). If the test fails, a human needs to run this script to update the filenames.
An automated test checks for discrepancies between category directory names and slugified category titles as IDs.

If the test fails, a human needs to run this script to update the directory names and add appropriate redirects.

**This script is not currently supported on Windows.**

---


### [`remove-deprecated-enterprise-version-markup.js`](remove-deprecated-enterprise-version-markup.js)
### [`reconcile-filenames-with-ids.js`](reconcile-filenames-with-ids.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.
An automated test checks for discrepancies between filenames and [autogenerated heading IDs](https://www.npmjs.com/package/remark-autolink-headings). If the test fails, a human needs to run this script to update the filenames.

You can run this script on either the help docs or the developer docs. To run it on the help docs, enter:
**This script is not currently supported on Windows.**

---

`script/remove-deprecated-enterprise-version-markup.js`

To run it on the developer docs, provide a path to your developer docs checkout as an argument. You can use a tilde to represent your home directory. For example:
### [`remove-deprecated-enterprise-version-markup.js`](remove-deprecated-enterprise-version-markup.js)

`script/remove-deprecated-enterprise-version-markup.js ~/Desktop/internal-developer.github.com/`
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.

---

Expand Down Expand Up @@ -310,7 +405,7 @@ Run this script to standardize frontmatter fields in all content files, per the

### [`sync-algolia-search-indices.js`](sync-algolia-search-indices.js)

This script is run automatically via GitHub Actions on every push to `master` to generate searchable data and upload it to our Algolia account. It can also be run manually. For more info see [search.md](../search.md)
This script is run automatically via GitHub Actions on every push to `master` to generate searchable data and upload it to our Algolia account. It can also be run manually. For more info see [contributing/search.md](contributing/search.md)

---

Expand Down Expand Up @@ -351,6 +446,13 @@ This script is used by other scripts to update temporary AWS credentials and aut
---


### [`update-versioning-in-files.js`](update-versioning-in-files.js)



---


### [`upload-enterprise-images-to-s3.js`](upload-enterprise-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.
Expand Down