|
github.event.pull_request.head.repo.full_name == 'nodejs/nodejs.org' && |
references the head being
nodejs/nodejs.org which will only ever be true for contributors with push access.
I think the vastly more common scenario is when someone forks the repo and tries making a change, like in #6952 (bad that it didnt provide feedback) - notice how our warning did not give the contributor feedback there, but it did for my contributor PR #6847 (bad that it tripped for us, we should have noticed).
IMO, the logic should instead be:
# 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')
nodejs.org/.github/workflows/translations-pr.yml
Line 25 in 9e56d4a
nodejs/nodejs.orgwhich will only ever be true for contributors with push access.I think the vastly more common scenario is when someone forks the repo and tries making a change, like in #6952 (bad that it didnt provide feedback) - notice how our warning did not give the contributor feedback there, but it did for my contributor PR #6847 (bad that it tripped for us, we should have noticed).
IMO, the logic should instead be: