Skip to content

feat: add pre-commit.ci lite as default CI option - #690

Open
lorenzwalthert wants to merge 4 commits into
mainfrom
feature/pre-commit-ci-lite
Open

lorenzwalthert wants to merge 4 commits into
mainfrom
feature/pre-commit-ci-lite

Conversation

@lorenzwalthert

Copy link
Copy Markdown
Owner

Summary

Adds pre-commit.ci lite as a new CI option (ci = "lite") and makes it the new default, replacing "native".

pre-commit.ci lite is a GitHub App that runs hooks on GitHub Actions and pushes auto-fix commits back to PR branches — combining the auto-fixing convenience of the full pre-commit.ci with the flexibility of GitHub Actions (system dependencies, custom runner environment, SHA-pinned workflows).

Changes

New CI option: ci = "lite"

  • use_ci("lite") and use_precommit(ci = "lite") copy two workflow templates into .github/workflows/:
    • pre-commit.yml — runs hooks on push/PR and triggers auto-fixing via the pre-commit.ci lite GitHub App
    • pre-commit-autoupdate.yml — opens a monthly PR with updated hook revisions (workflow_dispatch also supported)
  • After copying, the browser is opened to the GitHub App installation page (https://github.com/apps/pre-commit-ci-lite), consistent with the "native" experience
  • Workflow files use SHA-pinned action refs and RENV_CONFIG_CACHE_ENABLED: FALSE to avoid broken renv symlinks across cached runs

Default changed from "native" to "lite"

The precommit.ci option now defaults to "lite" in .onLoad(). Users who prefer the fully managed service can still pass ci = "native" explicitly.

Documentation

  • vignettes/ci.Rmd restructured: the comparison section is now a feature table (9 features × 3 options) with footnotes for nuance, replacing three separate pros/cons lists
  • Roxygen docs for use_ci() updated with a markdown list describing all four valid ci values
  • man/use_ci.Rd and man/use_precommit.Rd regenerated

Testing

Prototype workflows were developed and tested end-to-end in lorenzwalthert/precommit.test.ci.lite, including:

  • Auto-fix on PR (verified the GitHub App pushes a fix commit and re-triggers CI)
  • RENV_CONFIG_CACHE_ENABLED: FALSE as a fix for broken renv symlinks in cached runs
  • Monthly autoupdate workflow with actionable error message when PR creation permission is missing

@lorenzwalthert
lorenzwalthert force-pushed the feature/pre-commit-ci-lite branch from c3476a8 to 9c35f13 Compare November 4, 2026 20:13

This branch has not been deployed

No deployments
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.

1 participant