* 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
* 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>
* Adding Codespaces prebuilds
* Adding permissions
* Use pinned SHA for github/codespaces-precache action
* Add comments
* Add codespaces-precache repo to reference allow list
Co-authored-by: James M. Greene <jamesmgreene@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
* Add concurrency settings for a bunch of workflows
* Restrict prod deployments to one at a time but disallow interrupting
* Remove redundant pull_request.types specification
* Unlock before approving
* Revert "Unlock before approving"
This reverts commit 2b9bc2de94b412a49d3b81f4e48d798c48abfca0.
* Set content:write so we can approve locked PRs
* Add nextjs caching into all workflows with builds
* Reposition the nextjs cache step for test-windows.yml
* Fix cache and run build for browser-test.yml
* Update .github/workflows/browser-test.yml
* 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>
* Add permission matrices to all Actions workflows
Also cleanup a few token references
* Add actions:read permissions for CodeQL
* Add prs:read permissions for unit test workflow
* Enable auto-merge for translation-batches
* Attempt to approve and set auto-merge
* Temporarily disable check for tests
* Test commit. Revert later.
* Not self approving anymore
* Improve failure message
* Fix auto-merge
* Remove test code
* Add ownership to @github-actions
* 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
* Delete obsolete files from Crowdin in workflow
* Remove empty files before `crowdin upload`
Those files would have been rejected by Crowdin.
Close https://github.com/github/crowdin-support/issues/117
* Change delete command
* Add crowdin translations
* Run script/i18n/homogenize-frontmatter.js
* Run script/i18n/fix-translation-errors.js
* Run script/i18n/lint-translation-files.js --check parsing
* Run script/i18n/lint-translation-files.js --check rendering
* run script/i18n/reset-files-with-broken-liquid-tags.js --language=pt
* run script/i18n/reset-known-broken-translation-files.js
* Check in pt CSV report
Co-authored-by: Marcelo Jacobus <marcelo.jacobus@gmail.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
The new order will use "reset known broken files" as a last step. That
way we can better understand if the previous steps were enough to catch
those errors. The least files are reset in that last step, the better.
Also, the check for broken/mismatched liquid tags is performed after
rendering and parsing check. That helps us to identify how useful the
mismatch check is, if at all.
* 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
* 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
* Remove all translations before Crowdin sync
- See https://github.com/github/docs-engineering/issues/1114
* To be reverted
Temporarily change the branch name name in Crowdin sync
* Remove translations/*/data before Crowdin sync
* Fix actions check
* Revert "To be reverted"
This reverts commit 7bc38fa44a223eb1878d791107b5b5ce6cb50463.
* Pin crowdin/github-action
* Update site-policy-sync.yml
* Update site-policy-sync.yml
Added permissions. Tested successfully on the private repo
* Update allowed-actions.js
Removing now extraneous action from permissions
* run prettier to remove trailing whitespaces
Co-authored-by: Kevin Xu <khxu@github.com>
* fix: update staging-deploy-pr to never untar public builds, allow search to not error when missing indexes/records files
* add comment about tar extraction
* let lunr-search fail, for now, if the files are missing
Co-authored-by: Peter Bengtsson <mail@peterbe.com>
* workflow to transfer localization issues
* Update .github/workflows/transfer-to-localization-repo.yml
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
* Update transfer-to-localization-repo.yml
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>