Skip to content

Commit

Permalink
hotfix: provide proper context to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bmuenzenmeyer committed Dec 6, 2024
1 parent 16cc391 commit 91be9ec
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/translations-pr-lint-and-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Incoming Translation Checks
on:
# run when new translations download
workflow_run:
workflows: ["Crowdin Download"]
workflows: ['Crowdin Download']
types:
- completed
# run when someone tries to manually change localized content
Expand All @@ -34,8 +34,9 @@ jobs:
comment_on_translation_pr:
# This comment should always be posted on forks, or from internal PRs not originating from Crowdin (which are direct branches)
if: |
(github.event.pull_request.head.repo.full_name != 'nodejs/nodejs.org') ||
(github.event.pull_request.head.repo.full_name == 'nodejs/nodejs.org' && github.event.pull_request.head.ref != 'chore/crowdin')
(github.event_name == 'workflow_run' && github.event.workflow_run.head_commit.message != 'chore: synced translations from crowdin') ||
(github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != 'nodejs/nodejs.org') ||
(github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name == 'nodejs/nodejs.org' && github.event.pull_request.head.ref != 'chore/crowdin')
name: Comment on Translation PR
runs-on: ubuntu-latest
Expand Down Expand Up @@ -65,8 +66,8 @@ jobs:
format_crowdin_pull_request:
# We should only run the automated Format Command on Crowdin-based Pull Requests
if: |
github.event.pull_request.head.repo.full_name == 'nodejs/nodejs.org' &&
github.event.pull_request.head.ref == 'chore/crowdin'
(github.event_name == 'workflow_run' && github.event.workflow_run.head_commit.message == 'chore: synced translations from crowdin') ||
(github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name == 'nodejs/nodejs.org' && github.event.pull_request.head.ref == 'chore/crowdin')
name: Format Crowdin Pull Request
runs-on: ubuntu-latest
Expand Down

0 comments on commit 91be9ec

Please sign in to comment.