Skip to content

[CI] Upgrade pre-commit workflow to ASF approved prek-action - #506

Open
jbampton wants to merge 1 commit into
apache:trunkfrom
jbampton:add-prek-action
Open

jbampton wants to merge 1 commit into
apache:trunkfrom
jbampton:add-prek-action

Conversation

@jbampton
jbampton requested a balanced review from Copilot October 14, 2026 11:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open findings
What changed in this PR

Updates the CI pre-commit workflow to use the ASF-approved j178/prek-action pattern instead of manually installing dependencies and invoking pre-commit.

Changes:

  • Switches the workflow runner from ubuntu-24.04 to ubuntu-latest.
  • Replaces manual Python/pip install + pre-commit run with pinned actions/checkout + j178/prek-action.
  • Removes the explicit actions/cache configuration previously used for pre-commit hook caching.
File Description
.github/​workflows/​pre-commit.yml Migrates pre-commit CI execution to the ASF-approved prek-action approach.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

pre-commit:
name: Run pre-commit
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
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
- name: Set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v5
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants