fix: revert suggestions to workflow (#41199)
* fix: revert suggestions to workflow * fix: one more await
This commit is contained in:
committed by
GitHub
parent
219339b2ce
commit
037cd95d3d
7
.github/workflows/no-prs-to-translation.yml
vendored
7
.github/workflows/no-prs-to-translation.yml
vendored
@ -10,22 +10,21 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
has-translation:
|
has-translation:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.actor != 'github-actions[bot]'
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v3
|
- uses: actions/github-script@v3
|
||||||
with:
|
with:
|
||||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||||
script: |
|
script: |
|
||||||
if (context.payload.pull_request.head.repo.fork) {
|
if (context.payload.pull_request.head.repo.fork) {
|
||||||
github.issues.createComment({
|
await github.issues.createComment({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
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.'
|
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 {
|
} else {
|
||||||
github.issues.createComment({
|
await github.issues.createComment({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
|
Reference in New Issue
Block a user