From 037cd95d3d61a27cfc5cc5f3fbdb520130ef465f Mon Sep 17 00:00:00 2001 From: "Nicholas Carrigan (he/him)" Date: Sat, 20 Feb 2021 15:33:35 -0800 Subject: [PATCH] fix: revert suggestions to workflow (#41199) * fix: revert suggestions to workflow * fix: one more await --- .github/workflows/no-prs-to-translation.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/no-prs-to-translation.yml b/.github/workflows/no-prs-to-translation.yml index a1a8c14309..f94c124227 100644 --- a/.github/workflows/no-prs-to-translation.yml +++ b/.github/workflows/no-prs-to-translation.yml @@ -10,22 +10,21 @@ on: jobs: has-translation: runs-on: ubuntu-latest - if: github.actor != 'github-actions[bot]' steps: - uses: actions/github-script@v3 with: github-token: ${{secrets.GITHUB_TOKEN}} script: | if (context.payload.pull_request.head.repo.fork) { - github.issues.createComment({ + await github.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: 'Thanks for your pull-request. We are no longer accepting curriculum-related changes to non-English files. Please visit [our contributing guidelines](https://contribute.freecodecamp.org) to learn more about translating freeCodeCamp's resources.' }) - core.setFailed('This PR appears to touch translated challenge files.') + throw new Error('This PR appears to touch translated curriculum files.') } else { - github.issues.createComment({ + await github.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo,