* 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>
4.1 KiB
Executable File
4.1 KiB
Executable File