Copilot commented on code in PR #506:
URL: https://github.com/apache/openoffice/pull/506#discussion_r4270415575


##########
.github/workflows/pre-commit.yml:
##########
@@ -29,19 +31,12 @@ concurrency:
 jobs:
   pre-commit:
     name: Run pre-commit
-    runs-on: ubuntu-24.04
+    runs-on: ubuntu-latest

Review Comment:
   Using `ubuntu-latest` can introduce unexpected CI behavior when GitHub 
changes what it points to (toolchain/package versions, default Python, etc.). 
For reproducibility (and to match the previous behavior), consider pinning to a 
specific runner image (e.g., `ubuntu-24.04`) unless there’s a concrete reason 
to track `latest`.



##########
.github/workflows/pre-commit.yml:
##########
@@ -29,19 +31,12 @@ concurrency:
 jobs:
   pre-commit:
     name: Run pre-commit
-    runs-on: ubuntu-24.04
+    runs-on: ubuntu-latest
     steps:
-      - name: Check Out
-        uses: actions/checkout@v6
-      - name: Install
-        run: |
-          python -m pip install --upgrade pip
-          pip install -r requirements-dev.txt
-      - name: Set PY
-        run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
-      - uses: actions/cache@v5
+      - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"

Review Comment:
   On `pull_request` events, `github.ref` typically resolves to a 
`refs/pull/<id>/...` ref, which can make logs less readable than the source 
branch name. Consider using `github.head_ref` (or including both) in the step 
name to make the checkout target clearer in CI output.



##########
.github/workflows/pre-commit.yml:
##########
@@ -29,19 +31,12 @@ concurrency:
 jobs:
   pre-commit:
     name: Run pre-commit
-    runs-on: ubuntu-24.04
+    runs-on: ubuntu-latest
     steps:
-      - name: Check Out
-        uses: actions/checkout@v6
-      - name: Install
-        run: |
-          python -m pip install --upgrade pip
-          pip install -r requirements-dev.txt
-      - name: Set PY
-        run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
-      - uses: actions/cache@v5
+      - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 
v7.0.1
         with:
-          path: ~/.cache/pre-commit
-          key: pre-commit|${{ env.PY }}|${{ 
hashFiles('.pre-commit-config.yaml') }}
-      - name: Run pre-commit
-        run: pre-commit run --color=always --all-files
+          persist-credentials: false

Review Comment:
   This change removes the explicit caching of the pre-commit hook environments 
(`~/.cache/pre-commit`) that was previously configured. If `j178/prek-action` 
doesn’t provide equivalent caching by default, CI runtime may regress 
significantly. Consider restoring an explicit cache step (or enabling the 
action’s supported caching mechanism, if any) for `~/.cache/pre-commit` keyed 
on the hook config.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to