From 269209e7c38ea60341d07a9e74c274ffeab3a72e Mon Sep 17 00:00:00 2001 From: "Nicholas Carrigan (he/him)" Date: Thu, 4 Mar 2021 19:56:42 -0800 Subject: [PATCH] fix(tools): only camperbot translates (#41366) * fix(tools): only camperbot translates Modifies the no pr to translation workflow to fail on any PR that was not created by camperbot. * fix(tools): update message * Update .github/workflows/no-prs-to-translation.yml Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> --- .github/workflows/no-prs-to-translation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/no-prs-to-translation.yml b/.github/workflows/no-prs-to-translation.yml index 5aa047f28a..92746028b8 100644 --- a/.github/workflows/no-prs-to-translation.yml +++ b/.github/workflows/no-prs-to-translation.yml @@ -19,7 +19,7 @@ jobs: with: github-token: ${{secrets.GITHUB_TOKEN}} script: | - if (context.payload.pull_request.head.repo.fork) { + if (context.payload.pull_request.user.login !== "camperbot") { core.setFailed('This PR appears to touch translated curriculum files.') github.issues.createComment({ issue_number: context.issue.number, @@ -32,6 +32,6 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: 'WAIT! This message serves as a sanity check. Your PR appears to come from the base freeCodeCamp repository and modifies translated curriculum files or intro.json or translations.json. Before merging, please confirm that the commits on this PR originated from the Crowdin download action.' + body: 'WAIT! This message serves as a sanity check. You should *only* see this message if the PR was created as part of a Crowdin download action.' }) }