[all-commits] [llvm/llvm-project] 4aa12a: [Github] Fetch all commits in PR for code formatti...

Aiden Grossman via All-commits all-commits at lists.llvm.org
Mon Oct 30 12:24:06 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4aa12afb967bd7c5f051f3b72271f787f1a7538b
      https://github.com/llvm/llvm-project/commit/4aa12afb967bd7c5f051f3b72271f787f1a7538b
  Author: Aiden Grossman <agrossman154 at yahoo.com>
  Date:   2023-10-30 (Mon, 30 Oct 2023)

  Changed paths:
    M .github/workflows/pr-code-format.yml

  Log Message:
  -----------
  [Github] Fetch all commits in PR for code formatting checks (#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.




More information about the All-commits mailing list