diff --git a/.github/labels.yml b/.github/labels.yml index 51b7525f..35bf87d8 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -167,6 +167,11 @@ description: "Work paused until further notice" color: "e4e669" +# This Exercism-wide label queues a PR's English for translation (see exercism/i18n) +- name: "ready-to-translate" + description: "The English in this PR is final; queue its translations" + color: "1d76db" + # ----------------------------------------------------------------------------------------- # # These are the repository-specific labels that augment the Exercise-wide labels defined in # # https://github.com/exercism/org-wide-files/blob/main/global-files/.github/labels.yml. # diff --git a/.github/workflows/i18n-completeness.yml b/.github/workflows/i18n-completeness.yml new file mode 100644 index 00000000..7a827c9d --- /dev/null +++ b/.github/workflows/i18n-completeness.yml @@ -0,0 +1,26 @@ +# This workflow is installed as .github/workflows/i18n-completeness.yml in +# every repo that holds English. Don't edit it in those repos. Edit it in +# exercism/i18n/source-repo-workflows/ and copy it to each repo. Keep the file +# name, because exercism/i18n's rerun-source-check.yml looks for it. +# +# This workflow checks that exercism/i18n has a translation of all the English +# a PR changes, and fails if anything is missing. The work happens in +# exercism/i18n/.github/workflows/source-completeness.yml. This file only sets +# when it runs and what it is allowed to do. +# +# GitHub reports this check as `i18n / completeness`. To make it a required +# check, require that name. + +name: i18n completeness + +on: + pull_request: + branches: [main] + +permissions: {} + +jobs: + i18n: + permissions: + contents: read + uses: exercism/i18n/.github/workflows/source-completeness.yml@main diff --git a/.github/workflows/i18n-queue.yml b/.github/workflows/i18n-queue.yml new file mode 100644 index 00000000..0a54a99b --- /dev/null +++ b/.github/workflows/i18n-queue.yml @@ -0,0 +1,31 @@ +# This workflow is installed as .github/workflows/i18n-queue.yml in every repo +# that holds English. Don't edit it in those repos. Edit it in +# exercism/i18n/source-repo-workflows/ and copy it to each repo. +# +# When a maintainer adds the `ready-to-translate` label to a PR, this workflow +# opens an issue in exercism/i18n asking for the PR's English to be translated. +# The work happens in exercism/i18n/.github/workflows/source-queue.yml. This +# file only sets when it runs and what it is allowed to do. +# +# It runs on `pull_request_target` so that PRs from forks can use the +# organisation's secrets. That is safe because nothing in this workflow checks +# out or runs code from the PR. It only checks out exercism/i18n. +# `secrets: inherit` passes on the Exercism i18n app's private key, which the +# workflow uses to open the issue. + +name: i18n queue + +on: + pull_request_target: + types: [labeled, unlabeled, synchronize] + branches: [main] + +permissions: {} + +jobs: + i18n: + permissions: + contents: read + pull-requests: write + uses: exercism/i18n/.github/workflows/source-queue.yml@main + secrets: inherit