Run pint in check mode for pull requests from forks - #143
Open
sadiqk2 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
php-code-stylingfails on every pull request that comes from a fork, including #127, #128 and #136. It is not a code style problem, the job dies before Pint even runs:Two things are going on.
The checkout passes
ref: github.head_refbut norepository:, so it looks for the fork's branch inside this repository and cannot find it.build-plugin.ymlalready passesrepository: ${{ github.event.pull_request.head.repo.full_name }}, this workflow was never given the same treatment.Even with the checkout fixed, the auto fix path cannot work for a fork.
GITHUB_TOKENhas no write access to the contributor's fork, sogit-auto-commit-actiongets a 403 and the job fails again with a confusing error instead of a code style report.This change:
repository:to the checkout, so the fork's branch is actually fetchedtestModefor fork pull requests, so the job reports real style problems and passes when there are noneBehaviour for pushes and for internal branches is unchanged.