* Fix error on Pull Request creation
Fix https://github.com/github/docs-engineering/issues/1293. This
solution does not really handle the error, it just prevents the script
from stopping, since sometimes we get a timeout error from the load
balancer even though the request was successfully handled by rails.
* Add a nudge to the localization folks when a batch is created
Ever since the translation batches are created and merged automatically
it is difficult to see when they started or finished correctly. Also,
sometimes, docubot automatically closes some pull requests, and at the
time of this writing I don't know the reason.
This change intends to make batches not go unnoticed. We can revert it
later if this becomes too noisy and the process is stable.
* fix: remove ping to docs-localization team from batch PR body
Discussion: https://github.com/github/docs-internal/pull/23633/files#r771896816
* refactor: move report-reset-files into its own step
* refactor: move git push into its own step
* spike: move PR creation into its own script
* feat: annotate createTranslationBatchPullRequest fn
* enhancement: embed nwo#pr format in logger
* fix: import fs directly
* fix: import @actions/github directly
* docs: update annotations in fn block
* build: update step name to be self-documenting
* Retry on 502
* Rename method to reflect its behaviour
* Update codeowners
* Fix comment
* Update .github/actions-scripts/create-translation-batch-pr.js
Co-authored-by: Peter Bengtsson <peterbe@github.com>
* Update .github/actions-scripts/create-translation-batch-pr.js
Co-authored-by: Peter Bengtsson <peterbe@github.com>
* Update .github/actions-scripts/create-translation-batch-pr.js
Co-authored-by: Peter Bengtsson <peterbe@github.com>
* Appease linter and fix script
* Move options to main
* Rename var
* Refactor options
* Check for response
* First try to find and then to create the PR
* Update .github/actions-scripts/create-translation-batch-pr.js
Co-authored-by: Peter Bengtsson <peterbe@github.com>
* Update .github/actions-scripts/create-translation-batch-pr.js
Co-authored-by: Peter Bengtsson <peterbe@github.com>
* Update .github/actions-scripts/create-translation-batch-pr.js
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
* Remove unreachable conditional
* Lint
* fix: remove duplicate annotation
Co-authored-by: docubot <67483024+docubot@users.noreply.github.com>
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
* 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>
* Experiment with making the tarball smaller
Part of #1248
* try this
* stop debugging
* delete translations too
* delete heavy search indexes too
* push and popd
* try this hack
* delete but leave directory
* debug more
* faster delete of translations
* less loud
* async await
* async await
* no tree
* simplify
* experimenting more
* unfinished
* only the large files
* change order
* brotli with level 6
* cope better with decorated rest json files
* tidying
* keep images
* cleaning
* cleaning up
* refactored function
* try this
* better comment
* remove console logging
* more important changes
* improved fs.accessSync check
* migrate from actions/github-script to own scripts (staging deploy)
* make it executable
* remove need to --no-save install 'esm'
* don't use self-hosted runner so we get latest OS (2.285.0)
* remove pointless try/catch
* 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>