1
0
mirror of synced 2026-01-06 06:02:35 -05:00
Commit Graph

27 Commits

Author SHA1 Message Date
Peter Bengtsson
494df10c8b be consistent with which Node version in actions/setup-node (#25566) 2022-02-23 13:46:30 +00:00
Marcelo Jacobus
cf2603ac01 fix: retry translation batch PR creation if we hit a 502 (#23633)
* 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>
2022-01-11 23:06:18 +00:00
dependabot[bot]
893f50cd7a Bump actions/setup-node from 2.5.0 to 2.5.1 (#24009)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](04c56d2f95...1f8c6b94b2)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-01-10 09:07:53 -05:00
Marcelo Jacobus
3b0594e3ce Automate closing of stale translation batches (#23581)
* Automatically close stale translation batches

* fix: adjust spacing for the query key

Resolves CI failure: https://github.com/github/docs-internal/runs/4486848450?check_suite_focus=true#step:3:4

* Fix query

* enhancement: add type filter to query

`type` filter restricts results to either issues or pull requests. In this case, we want to close existing stale batches that are _only_ pull requests.

Docs: https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests

* feat: use lee-dohm/close-matching-issues v2.1.0

https://github.com/lee-dohm/close-matching-issues/pull/357 is merged into this release, which gives the action the ability to close matching issues _and_ pull requests.

Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
2021-12-20 17:50:37 +00:00
Rachael Sewell
02c5e44c4d Run translation workflow once a day (#23765)
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
2021-12-16 16:56:35 +00:00
James M. Greene
3d88cae50b Add permission matrices to all Actions workflows (#23563)
* 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
2021-12-14 04:37:36 +00:00
Marcelo Jacobus
dc0d22fa84 Run workflow every six hours (#23585)
* Run cronjob every six hours

* fix: run translation batch PRs on the 25th minute

Resolves CI failure in https://github.com/github/docs-internal/runs/4490412418?check_suite_focus=true#step:10:97

Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
2021-12-13 17:48:23 +00:00
Francis
04c8ed5726 fix: verify Crowdin CLI download before installing (#23515)
This change uses the suggested steps in https://support.crowdin.com/cli-tool/#debian,
with a slight modification in creating the `crowdin.list` file in the `/etc/apt/sources.list.d` directory.

This approach creates a new file for `crowdin.list`, then pipes the content to `tee -a`. Credits go to [this Ask Ubuntu thread reply](https://askubuntu.com/questions/185268/permission-denied-etc-apt-sources-list/185270#185270).
2021-12-11 02:08:00 +00:00
Marcelo Jacobus
daa16775d8 Fix label for translation batches (#23577) 2021-12-11 01:48:22 +00:00
Marcelo Jacobus
953e87e7a0 Use @octomerger for approving and merging translation batches (#23546)
* Use @octomerger for approving and merging translation batches

Here is a [list of bots](https://github.com/github/docs-engineering#bot-accounts)

* Set @octomerger as a code owner of /translations
2021-12-09 20:13:43 +00:00
Marcelo Jacobus
0c02f91dd0 Enable auto-merge for translation-batches (#23464)
* 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
2021-12-09 17:06:45 +00:00
docubot
858a0ab79a New translation batch for pt (#23500)
* 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>
2021-12-08 21:30:15 +00:00
Marcelo Jacobus
39d07cb977 Restrict workflow to docs-internal (#23489)
Closes https://github.com/github/docs-engineering/issues/1340
2021-12-08 14:13:46 -03:00
Francis
13a304c14d feat: include label in PR creation (#23380)
This includes the `translation-batch` label when a new PR is created for a translation batch: https://github.com/github/docs-internal/issues?q=label%3Atranslation-batch+
2021-12-06 19:52:02 +00:00
dependabot[bot]
038e81826b Bump actions/checkout from 2.3.5 to 2.4.0 (#23297)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](1e204e9a92...ec3a7ce113)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2021-12-02 14:15:21 +00:00
dependabot[bot]
95edf7be45 Bump actions/setup-node from 2.4.1 to 2.5.0 (#23293)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](270253e841...04c56d2f95)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2021-12-02 13:25:56 +00:00
Marcelo Jacobus
814ae6b521 Add crowdin_language to matrix (#23254)
* Add crowdin language to matrix

* Fix languages config

* Fix Spanish language code and reorder keys
2021-12-01 16:18:06 +00:00
Marcelo Jacobus
1125b8aac9 Change translation batch log path (#23241) 2021-11-30 21:25:11 +00:00
Marcelo Jacobus
601d05e6a4 Change order of steps in create-translation-batch-pr.yml (#23210)
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.
2021-11-30 08:28:38 -08:00
Marcelo Jacobus
463ecbc337 Enable Japanese in create-translation-batch-pr.yml (#23101) 2021-11-30 13:45:00 +00:00
Marcelo Jacobus
424483ac6e Enable Chinese in create-translation-batch-pr.yml (#23100) 2021-11-30 13:33:27 +00:00
Marcelo Jacobus
94361206a0 Enable Spanish in create-translation-batch-pr.yml (#23102) 2021-11-30 13:25:54 +00:00
Marcelo Jacobus
855034fec3 Report files reset during the translation batch (#23159)
* 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
2021-11-30 12:31:08 +00:00
Marcelo Jacobus
6e01e74b39 Only check in the language files (#23162) 2021-11-30 12:23:11 +00:00
Francis
894182d2f1 fix: s/parsin/parsing (#23038)
Closes https://github.com/github/docs-internal/issues/23037
2021-11-22 20:32:17 +00:00
Marcelo Jacobus
7079099c48 Fix url in slack notification (#22998)
* Attempt to fix url in slack notification

* Try again

* That is it

* Remove the link
2021-11-19 15:27:58 +00:00
Marcelo Jacobus
e21c373b57 Automate translation batch PRs (#22857) 2021-11-19 00:43:15 +00:00