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