Double workflow setup makes it harder to notice problems with actual linting action, because it's not visible from pull request page. Changing workflow trigger to pull_request_target with different reference to be checked out allows for running linting process with elevated permissions for pull requests from forked repositories.
Required permissions are explicitly listed to limit access to unused GitHub API endpoints.
Double workflow setup makes it harder to notice problems with actual linting action, because it's not visible from pull request page. Changing workflow trigger to
pull_request_target
with different reference to be checked out allows for running linting process with elevated permissions for pull requests from forked repositories. Required permissions are explicitly listed to limit access to unused GitHub API endpoints.