potpie-ai/potpie

Update Pre-commit Hook Configuration for CI/CD Pipeline

Open

#519 opened on Dec 11, 2025

 (2 comments) (0 reactions) (0 assignees)Python (642 forks)auto 404
CI/CDdocumentationgood first issue

Repository metrics

Stars
 (5,521 stars)
PR merge metrics
 (PR metrics pending)

Description

The current pre-commit configuration is applying automatic fixes on every PR run, which can lead to unintended changes and workflow complications. We need to restrict pre-commit to run only test validations via the pre-commit CI service without relying on uv.

1. Update Pre-commit Configuration

  • Modify .pre-commit-config.yaml to run only tests/validations in the CI environment
  • Remove auto-fixing hooks from the CI pipeline, developers should run fixes locally before pushing, not in CI
  • Ensure no dependency on uv for pre-commit CI runs, use base or pip or some pre-configured CI layer like https://github.com/marketplace/pre-commit-ci
  • Ensure that it only runs on push to main or PRs to main

2. Configure Pre-commit CI Service

  • Use pre-commit CI service to run read-only checks only
  • Hooks should validate code but not modify it
  • Hooks to keep: linting, formatting checks (no apply), type checking, security scans

3. Add Developer Documentation

Create a new section in developer docs (GETTING_STARTED.md or new PRECOMMIT.md) covering:

Local Pre-commit Setup

  • How to install pre-commit
  • How to install pre-commit hooks
  • How to run pre-commit locally before pushing

Running Pre-commit Locally

  • Run all hooks: pre-commit run --all-files
  • Run specific hook: pre-commit run [hook-id] --all-files
  • Automatic fixes: Which hooks auto-fix and how to apply them
  • Skipping hooks if needed: SKIP=hook-id git commit

Resolving Pre-commit Failures

  • Common issues and fixes
  • How to apply auto-fixes locally
  • How to manually fix validation errors
  • When to commit the auto-fix changes

Contributor guide