From 4f88d2d51e96d271299acf14f0e61db1fe9d2e88 Mon Sep 17 00:00:00 2001 From: Producer Matt <58014742+ProducerMatt@users.noreply.github.com> Date: Sat, 22 Jun 2024 14:31:48 -0500 Subject: [PATCH] oops --- .github/workflows/elixir.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 7a55d5b..0b6a316 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -91,17 +91,17 @@ jobs: run: | nix develop -c pre-commit run --show-diff-on-failure --color=always --all-files - # # NOTE: the above runs on all files regardless of if they changed. What would be better would be checking only the files in a P.R. that changed. - # # However, my attempt below to do so raises an error saying "unknown revision or path 'main..dev'" and I don't know how to fix it. - # - name: Run pre-commit checks - # env: - # HEAD_REF: ${{ github.head_ref }} - # BASE_REF: ${{ github.base_ref }} - # run: | - # if [[ -n "$HEAD_REF" && -n "$BASE_REF" ]]; then - # git fetch --depth=1 origin "$BASE_REF" - # git fetch --depth=1 origin "$HEAD_REF" - # nix develop -c pre-commit run --show-diff-on-failure --color=always --to-ref "$BASE_REF" --from-ref "$HEAD_REF" - # else - # nix develop -c pre-commit run --show-diff-on-failure --color=always --all-files - # fi +# # NOTE: the above runs on all files regardless of if they changed. What would be better would be checking only the files in a P.R. that changed. +# # However, my attempt below to do so raises an error saying "unknown revision or path 'main..dev'" and I don't know how to fix it. +# - name: Run pre-commit checks +# env: +# HEAD_REF: ${{ github.head_ref }} +# BASE_REF: ${{ github.base_ref }} +# run: | +# if [[ -n "$HEAD_REF" && -n "$BASE_REF" ]]; then +# git fetch --depth=1 origin "$BASE_REF" +# git fetch --depth=1 origin "$HEAD_REF" +# nix develop -c pre-commit run --show-diff-on-failure --color=always --to-ref "$BASE_REF" --from-ref "$HEAD_REF" +# else +# nix develop -c pre-commit run --show-diff-on-failure --color=always --all-files +# fi