Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Github] Fetch all commits in PR for code formatting checks (llvm#69766)
This patch makes a couple changes to the PR code formatting check: - Moves the `changed-files` action to before the checkout to make sure that it pulls information from the Github API rather than by running `git diff` to alleviate some performance problems. - Checkout the head of the pull request head instead of the base of the pull request to ensure that we have the PR commits inside the checkout. - Add an additional sparse checkout of the necessary LLVM tools to run the action to alleviate security problems introduced by checking out the head of the pull request. Only code from the base of the pull request runs. - Adjust the commit references to be based on `HEAD` as Github doesn't give exact commit SHAs for the first commit in the PR.
- Loading branch information