* indexing records into Elasticsearch
* @elastic/elasticsearch@8.2.0
* mv
* fix the code
* pipe
* lfs
* use sha
* change how index names work
* better snowballing
* improvements and upgrade
* index more explicitly
* wip
* no need to save space with elasticsearch
* update package-lock
* Revert "no need to save space with elasticsearch"
This reverts commit 9cdd4d8f4fa7be822bdef3976091c3c640519dec.
* adding a comment
* better comment
* a better comment
* feedbacked
* more comment
* reduce linkinator concurrency from 300 to 100
* reduce it and use self-hosted
* try again
* actually do concurrency of 10
* move the override to the Action workflow
* Trying `DISABLE_RENDERING_CACHE`
* back to 100?
* super low concurrency
* 3??
* 1??
* try self-hosted + 100 concurrency
Co-authored-by: Peter Bengtsson <mail@peterbe.com>
* run link checker against localhost:4000 instead of prod
* exclude docs.github.com
* print output if possible
* upload broken_links.md as artifact
* debug broken_links.md
* first stage of test
* update test
* add rest test for categories and subcategories rendering
* update timeout back to original
* remove export
* remove testing
* refactor test-open-api-schema
* remove function
* remove check
* remove slash
* remove comment
* rearrange
* update getting the categories and maptopic levels
* update tests
* update copy
* add error message task
* Make a copy of the type array, splice() will modify it
* Also check for 'array' in array of types
* Add updated decorated files
* Make copying clearer
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
* Check for 'object' in ['object', 'null']
* Add updated decorated files
* arrays can also be null with this format
Co-authored-by: Rachael Sewell <rachmari@github.com>
* arrays can also be null with this format
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
* warn on orphan images
* oops
* temporarily adding orphan image
* fix the bug
* permission
* better comment
* try this
* try this
* debugging
* debugging
* using fs
* cjs
* remove experiment image
* debugging
* debugging
* try that
* try that
* git config
* cleaning
* token
* body
* label
* try that
* try that
* try that
* not upstream
* try that
* token twice
* try again
* cleaning up
* fix unit test
* one more exception
* feedbacked
* reinstate
* start server manually
* routing tests too
* skip more
* sleep more and fail if not 200
* use e2etest for content/ too
* automatically start server for jest
* does this work?
* feedbacked
* rename things
* getting it to work
* add dev dependency
* install the right version
* don't need to start that
* fix package lock
* update readme about it
* feedbacked
* don't need disk caching for site-data
* reinstate
* start server manually
* routing tests too
* skip more
* sleep more and fail if not 200
* use e2etest for content/ too
* automatically start server for jest
* does this work?
* feedbacked
* rename things
* getting it to work
* add dev dependency
* install the right version
* don't need to start that
* fix package lock
* update readme about it
* feedbacked
* CLI tool to rename file or tree
* it works
* progress
* progress
* wip
* wip
* wip
* debugging
* fixed
* remove console logging
* add support for also updating learning-tracks
* cope with the 'children' key in the root content/index.md unicorn
* update childGroups too
* guardrails
* refactor
* tidying up arguments
* refactored for single files
* nicer error in pre-validation of the first file argument
* regression fix
* fix for moving directories
* delete lib/redirects/.redirects-cache.json if present
* sync serialize sitedata to disk
* use os.tmpdir
* refactor tests
* debugging
* use log
* debugging
* louder about syntax errors
* warn-before-tests
* louder about disk-caching redirects
* less loud
* only in development again
* Add '--list' parameter to rendered-content-link-checker script
* Utilize trilom/file-changes-action output files and pass to rendered-content-link-checker script
* Rename job to unique name
* Correct module path for import
* Move import into local imports section
* Dump the contents of the file listing
* Fix typo
* Update remove-stale-staging-resources workflow to completely replace undeploy workflow
* Delete the staging-undeploy-pr workflow file
* Delete all undeployment scripts and logic
* Remove all references to the automated-block-deploy label used for undeployment
* Simplify staging cross-workflow concurrency needs
* Make a dedicated, fast, workflow just for docs-internal only
Part of #1297
* make staging-build-pr only for github/docs
* prune later
* make it louder and clearer about disabling workflows
* does it merge?
* typo
* rename ref
* rename
* early access should be good to go
* far from perfect
* start with that
* gzip
* rearrange
* html_url
* correction of actions/checkout sha
* correction of actions/setup-node sha
* quote
* ooops
* actually deploy
* move @octokit/rest to dependencies
* await-sleep hack
* reinstall npm
* typo
* CONTEXT_NAME
* deployments:write permission
* pull-requests:read permission
* actions:read and statuses:write permissions
* private repo mention exception
* it's called github.run_id
* Apply suggestions from code review
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* make CONTEXT_NAME optional (if it works)
* comment out CONTEXT_NAME
* simplifying
* going to run on on.pull_request instead
* remove comment
* only the 2-phase staging deploy on github/docs
* better if statement on label check
* refactor of staging-deploy script
* switch to npm install to get the deDependencies back
* using --only=dev
* updating comments
* event_name
* not on pushes to main
* add staging-commit-status-success
* testing testing
* fix linting error
* Remove other docs-internal references from staging-deploy-pr.yml
* Cleaning up new staging-commit-status-success script and usage
* Remove unnecessary environment refs
* Remove unnecessary fallback
Since the only event trigger is pull_request now instead of also push
* Remove unnecessary env vars from workflow
* docs-internal or docs but not both
* Don't provide unnecessary environment refs
* remove now moot exception
* setting it to pull_request_target
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* cache asset images more aggressively
* more careful about which gets the manual surrogate key
* fix rendered-content-link-checker script too
* feedbacked
* one fast link checker to rule them all
* -L alias
* refactor
* hacking away
* passing pages
* adding a workflow
* limit level to critical
* ability to pass a specific set of files
* testing specific files
* remove temporary debugging
* reorganize the printing
* formatting of output
* check images too
* prettyFullPath()
* minimal permission on workflow
* update comment
* new permission
* fix actions shas
* Output every file reset
* Add --dry-run and --reason options to reset-translated-file.js
* Output reason when reset-translated-file.js script is called
* Add script to report reset files
* Has the workflow report the reset files
* Fix script name
* Filter report by language
* Update .github/workflows/create-translation-batch-pr.yml
* Use build in array methods
* Fix error
* Attempt to fix that error
* Remove debugging code
* fix: Update path of lint-translation script
* fix: Update conditional guard clause
The conditional compared an array to a string using strict equality, so
it was never going to be true. This change makes sure we return early
when there are no changes.
* fix: Exit early when there are no files to lint
* refactor: Filter files to reset in plain javascript
As opposed to doing it in bash.
* Update tests/linting/lint-files.js
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
* Update tests/linting/lint-files.js
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
* Update script/i18n/lint-translation-files.js
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
* fix: update lint-translation script to point to the correct test
This change reflects its new home in `test/linting/lint-files.js` as committed in f0d17c300d on April 28, 2021.
* test: check release notes can be parsed a single YAML document
* test: check yaml content parsability
* test: check parsability for all YAML content
* refactor: move annotations to lint yaml content suite
* fix: revert file contents
* fix: remove local test script
* refactor: lowercase yaml file type
* fix: remove null assignment to stay consistent with other variables
* refactor: update reference name to caught error
* fix: remove the royal we from annotation
* refactor: update annotation for improved readability
* fix: add missing preposition
* fix: make script for linting translations executable
* fix: execute the command directly
* feat: surface any errors if lint check fails
* fix: do not return early if lint check errors
Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>
* feat: stub two reset scripts
* refactor: split lint script into two separate files
* fix: revert back to original lint script
* refactor: use commander interface for linting translation files
* Skip reset attempt when violation list is empty
So that "execSync(`cat ${log}...`)" in line 64 is never executed. When
there are no errors, the log file is not created, and unless it had been
previously created by another process, the script will error out.
Co-authored-by: Marcelo Jacobus <marcelo.jacobus@gmail.com>
* fix: de-duplicate and filter non-existent broken files
* fix: sequentially reset known broken translation files
When a known broken translation is reset, a Git operation performs the
underlying reset. If more than one Git operation is running at a time,
Git will throw an error:
> Another git process seems to be running in this repository [...]
This change ensures that we reset each broken translation file
sequentially to not run into this error.
* Skip reset of a file that does not exist
Co-authored-by: Marcelo Jacobus <marcelo.jacobus@gmail.com>
* updating search icon
* remove no fill
* update fill color
* using ActionList and Overlay
* update to ActionList, Overlay, add Label to Breadcrumbs, and change Mark
* add search-results test data and move header search results to right
* make search results scrollable and fix max-width in header search
* update header search and styling updates
* add highlight
* update styling
* styling and lint errors
* fix lint error and fetch
* Update components/Search.tsx
* update label color
* remove bottom margin
Co-authored-by: Rachael Sewell <rachmari@github.com>
* Create migrate-colors-primer-18.js
* Update colors round 1
* upgrade primer packages
* Update index.scss
* Replace auto colors
* remove btn-primary-matte
* Turns out the class names and variables names DONT LINE UP... ugh....
* Check for allowed var colors
* Do not use `build.status` of 'pending' as a looping condition for Heroku deployment
* Don't wait for `appSetup.status` either
* Fix incorrect Octokit method usage in local deploy script
* Bump the number of allowable errors from 5 to 10
* More logging!
* Add an environment variable for easily increasing the number of allowed Heroku failures per phase of polling
* Move concurrency control to top-level in prod deploy workflow
* Add 503 to the list of temporarily acceptable Heroku failure codes
* Add HEROKU_PRODUCTION_APP_NAME back into the prod deploy workflow
* run prettier
* removing files from test/integration
* update cron job to not start on the hour
* add github/github comment
* update comment
* updating to search by indices in the content rather than by line
* small updates and updating character max
* update name of script run
* updating to use api search code and get contents
* using api search code and get contents
* adding token check and .js
* remove blank line for title
* update issue body content
* update comment
* add support for GitHub.developer_help_url links
* Update the production deployment workflow to target the main Heroku app
Without exposing our internal Heroku app name!
* Refactor the staging deployment script a bit to match more closely
* Use the HEROKU_PRODUCTION_APP_NAME Secret in the workflow
* Add a note about the newly required environment variable for production deployment into the local deploy script
* Add critical errors if the HEROKU_PRODUCTION_APP_NAME is missing
* Extract HEROKU_PRODUCTION_APP_NAME from process.env
* Revert the critical parts of PR #21807 to no longer deploy to prod via Actions
* Don't require HEROKU_PRODUCITON_APP_NAME
* Update the production deployment workflow to target the main Heroku app
Without exposing our internal Heroku app name!
* Refactor the staging deployment script a bit to match more closely
* Use the HEROKU_PRODUCTION_APP_NAME Secret in the workflow
* Add a note about the newly required environment variable for production deployment into the local deploy script
* Add critical errors if the HEROKU_PRODUCTION_APP_NAME is missing
* Extract HEROKU_PRODUCTION_APP_NAME from process.env
* Use the 'script/deployment/create-staging-app-name' module when creating the content changes table comments
* Remove the shebang from the non-runnable script helper module
* Create a logic branch to deploy to production via a local script
* Ignore forceRebuild default value for production
* Add soft warnings for missing-but-not-critical env vars
* Only include the Preboot delay if the Fastly env vars are present
* Add some warning emojis ⚠️
* More emojis!
* Make FASTLY_* checks all independent
* Add more comments about additional env vars recommended for a local prod deployment
* add production deployment
* updating existing build
* remove state
* remove PR_URL and switch to main branch
* break out into build, prepare, and deploy
* update to download-artifact
* update staging to prod
* Actions production deployment redux (#21238)
* Simplify production deployment into a single Actions job
* Force esm to install
* Switch flag ordering to match staging deploy
* Use 'npm install' for the second installation to avoid deleting the prodDeps
* Apply Heroku upload fixes
* Include `.npmrc` file in builds to omit `optionalDeps`
* Remove download-artifact action
Co-authored-by: Grace Park <gracepark@github.com>
* Script updates to prod deployment (#21247)
* updating script to use latest sha
* changing back workflowRunLog
* remove line
* update error wording
* remove comment - using commit sha
* need release.id
* Update script/deployment/deploy-to-production.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* remove hydro
* Update script/deployment/deploy-to-production.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Update .github/workflows/prod-build-deploy-pr.yml
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Update script/deployment/deploy-to-production.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Update script/deployment/deploy-to-production.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Update script/deployment/deploy-to-production.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* updating spacing
* add 404/429 responses while polling Heroku API for prod
* removing nested ifs
* adding SOURCE_BLOB_URL
* update for early access
* add install dotenv
* need to add persist-credentials
* Testing GET request
* update request
* Rename workflow file to remove '-pr'
We are now triggering on pushes to 'main' rather than PR merges
* Remove the unnecessary workflow step to create a failure Status
Because the production deploy is done via a single workflow rather than a 2-part workflow chain, this is thankfully unnecessary
* Install all of the npm dependencies
We'll need them!
* Add the '-z' flag to 'tar' to gzip the tarball
* Pass the Heroku upload URL via env vars for security
Prevents potential injection attacks
* Log the deployment ID and log URL as deploy step outputs
* Take notice of Heroku polling resulting in failure statuses
* Add a note to consider waiting for Heroku Preboot
* Add a script and workflow step to purge Fastly
* update response to get sha
* Switch to Octokit functions instead of 'request' method
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Explicitly ensure the early access parent directories are created when cloning
* Use explicit --file flag with tar
* Remove security hole for Staging deployment by concatenating archives
* Fail the staging builds if *.js, .npmrc, or Procfile is changed in the open source repo
* docker build: extract user-code in separate directory
* Checkout PR base branch and install dependencies
* Remove one-off package installs
* Remove selective file checkout
* Don't persist git cloning credentials
It usually makes the clone of early access content fail in the later steps
* Update .github/workflows/staging-deploy-pr-docker.yml
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Update .github/workflows/staging-deploy-pr-docker.yml
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Remove debugging step
* Best practice: Use environment variables to avoid potential injection attacks if the data was user-controlled
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: Robert Sese <sese@github.com>
Co-authored-by: Robert Sese <robert.sese@gmail.com>
* Add a script to remove stale staging deployment environments from GitHub
* Add second job to cleanup GitHub deployment environments
* Specify GITHUB_TOKEN permissions matrix
* Stop marking staging deployments as transient
* Update staging undeployment mechanism to clean-up deployment environments on PR merge
* Define a stale PR as one that was merged or has been closed for more than 2 hours
* Rename workflow file
* Update Staging deployment workflow to create Status updates
* Update local Staging deployment script to create Status updates
Co-authored-by: Rachael Sewell <rachmari@github.com>
* Start parallel Docker image deploy workflows
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@users.noreply.github.com>
* Add early access content build stage
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
* Create Heroku App script and workflow steps
* Tag the image for Heroku
* Push the image and grab the image ID
* Set app name and image id outputs
* Add parallel deploy script for Docker
* Scope workflow run to 'docker-' and release image to Heroku
* Update .github/workflows/staging-build-pr-docker.yml
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Exclude Docker workflow
* Cleanup Docker deploys
* Use action sha
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* update article content to markdown ui component
* decouple lunr indexing from class name
* remove summary outline none rule, apply utility class instead
* improve typing
* scope more styles down to markdown-body/extended-markdown
* move all markdown-body style overrides to MarkdownContent component
* fix class targeting within css module
* clean up MarkdownContent header style
* rename data-lunr to data-search
* fix: inline code color issue
* fix: update article markdown to work with MarkdownContent
* Add a Staging build workflow
* Remove all commented out code from build workflow
It will be handled in https://github.com/github/docs-engineering/issues/726
* Use pinned version of upload-artifact action
* Tweaks to build
* Minor deployment script refactoring
* Update the Staging deployment workflow
* Missed refactoring tweak
* Add relevant comments
* Update Heroku app naming convention for Actions deploy to include 'gha-' prefix
* Update Heroku app ConfigVars and SourceBlob for optional prebuilt app
* Remove obsolete 'dist/' dir from PR build artifact
See https://github.com/github/docs-internal/pull/20405
* Ensure a new enough version of npm is used
* Switch to creating a tarball for upload
* Remove obsolete 'layouts' dir from file list
* Ditch the verbosity for 'tar'... too many files
* Add tarball support to deploy
* Add esm workaround to deploy script
See https://github.com/actions/github-script/issues/168
* Temporarily ignore staging deploy workflow from workflow linter
* Update deployment to use a Heroku Build Source instead of a GitHub Actions Artifact
* Update undeploy workflow to use ESM workaround
See https://github.com/actions/github-script/issues/168
* Add 'esm' package to optionalDependencies to better support workaround
See https://github.com/actions/github-script/issues/168
* Add Slack notifications for workflow failures
* Wrap AppSetup polling in try-catch
* Improve dyno monitoring
* Rename 'script/deploy' to have a .js extension #esm
* Update script references to include the extension
* Use non-deprecated Sources API for Heroku
* Use normal quotes
* Stub in a step to mark deployment inactive after timing out
* Apply suggestions from code review
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
* Clear out some non-fn references to Algolia
* Update .github/workflows/dry-run-sync-search-indices.yml
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Update contributing/search.md
Co-authored-by: James M. Greene <JamesMGreene@github.com>
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Update some readFileSync to await readFile with top level await
* More updates
* Update all-products.js
* Use 'lib/readfile-async.js' in runtime files for better performance
* Remove unnecessary use of 'for await...of' loops
* Revert to importing 'fs/promises'
Co-authored-by: James M. Greene <jamesmgreene@github.com>
* Update the trim nightmare
* Update create-processor.js
* Update other packages in the rendering pipeline
* A few more updates
* Fix tables
* Update lint-files.js
* Fix copy code blocks
* Update render-content.js
* remove whitespace from liquid conditionals
* We no longer need require eslint rules
* Neat, it worked
* Revert test change
* Update create-processor.js
* Without aliases
Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
* First run of script
* Get the app running --- ish
* Get NextJS working
* Remove `node:`
* Get more tests passing in unit directory
* Update FailBot test to use nock
* Update test.yml
* Update Dockerfile
* tests/content fixes
* Update page.js
* Update build-changelog.js
* updating tests/routing
* Update orphan-tests.js
* updating tests/rendering
* Update .eslintrc.js
* Update .eslintrc.js
* Install jest/globals
* "linting" tests
* staging update to server.mjs
* Change '.github/allowed-actions.js' to a ESM export
* Lint
* Fixes for the main package.json
* Move Jest to be last in the npm test command so we can pass args
* Just use 'npm run lint' in the npm test command
* update algolia label script
* update openapi script
* update require on openapi
* Update enterprise-algolia-label.js
* forgot JSON.parse
* Update lunr-search-index.js
* Always explicitly include process.cwd() for JSON file reads pathed from project root
* update graphql/update-files.js script
* Update other npm scripts using jest to pass ESM NODE_OPTIONS
* Update check-for-enterprise-issues-by-label.js for ESM
* Update create-enterprise-issue.js for ESM
* Import jest global for browser tests
* Convert 'script/deploy' to ESM
Co-authored-by: Grace Park <gracepark@github.com>
Co-authored-by: James M. Greene <jamesmgreene@github.com>