{"id":27655253,"url":"https://lorenzwalthert.github.io/precommit/","last_synced_at":"2025-04-24T06:01:52.724Z","repository":{"id":38804890,"uuid":"186313720","full_name":"lorenzwalthert/precommit","owner":"lorenzwalthert","description":"pre-commit hooks for R projects","archived":false,"fork":false,"pushed_at":"2025-04-09T20:51:48.000Z","size":4112,"stargazers_count":257,"open_issues_count":27,"forks_count":50,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T16:58:59.142Z","etag":null,"topics":["git","hooks","pre-commit","vcs","workflow"],"latest_commit_sha":null,"homepage":"https://lorenzwalthert.github.io/precommit/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lorenzwalthert.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"lorenzwalthert","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-05-12T23:11:07.000Z","updated_at":"2025-04-09T20:49:07.000Z","dependencies_parsed_at":"2023-10-05T17:37:09.298Z","dependency_job_id":"d5349025-dca9-4cb8-90d5-d954e0d86f25","html_url":"https://github.com/lorenzwalthert/precommit","commit_stats":{"total_commits":1623,"total_committers":28,"mean_commits":"57.964285714285715","dds":"0.15834873690696238","last_synced_commit":"0bae714502ca7621d07996e30ded683c29ac5480"},"previous_names":[],"tags_count":117,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzwalthert%2Fprecommit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzwalthert%2Fprecommit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzwalthert%2Fprecommit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzwalthert%2Fprecommit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lorenzwalthert","download_url":"https://codeload.github.com/lorenzwalthert/precommit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250573330,"owners_count":21452347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","hooks","pre-commit","vcs","workflow"],"created_at":"2025-04-24T06:01:09.750Z","updated_at":"2025-04-24T06:01:52.693Z","avatar_url":"https://github.com/lorenzwalthert.png","language":"R","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  fig.path = \"man/figures/\",\n  eval = FALSE\n)\n```\n\n# Useful git pre-commit hooks for R\n\n\u003c!-- badges: start --\u003e\n\n[![CRAN status](https://www.r-pkg.org/badges/version/precommit)](https://CRAN.R-project.org/package=precommit) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![R build status](https://github.com/lorenzwalthert/precommit/workflows/R-CMD-check/badge.svg)](https://github.com/lorenzwalthert/precommit/actions)\n\n\u003c!-- badges: end --\u003e\n\n[Pre-commit hooks](https://pre-commit.com) are tests that run each time you attempt to commit. If the tests pass, the commit will be made, otherwise not. A very basic test is to check if the code is parsable, making sure you have not forgotten a comma, brace or quote. You can run hooks locally and/or in the cloud:\n\n-   As a check before local commits: This requires installing pre-commit.\n\n-   As a CI check with \u003chttps://pre-commit.ci\u003e: If you want to enforce passing hooks on pull requests (and auto-fix trivial problems like styling) even if the committer does not have a local installation.\n\n## Goals of the package\n\nThe goal of this package is to twofold:\n\n-   Provide a [set of hooks](https://lorenzwalthert.github.io/precommit/articles/available-hooks.html) that are useful when your git repo contains R code.\n\n-   Provide [usethis](https://github.com/r-lib/usethis)-like functionality for common tasks such as installation and set-up and config file modification.\n\n## Why do I need pre-commit hooks?\n\n\u003cfigure\u003e\n\u003cimg src=\"man/figures/pre-commit-meme.jpeg\" width=\"500\" align=\"center\" href=\"https://twitter.com/dataandme/status/1255510799273132032\"/\u003e\n\u003cfigcaption\u003eBy \u003ca href=https://twitter.com/dataandme/status/1255510799273132032\u003eMara Averick\u003c/a\u003e\u003c/figcaption\u003e\n\u003c/figure\u003e\n\nFor a more in-depth explanation and even more reasons, see `vignette(\"why-use-hooks\")`.\n\n## Documentation\n\nThe following online docs are available:\n\n-   [latest CRAN release](https://lorenzwalthert.github.io/precommit/).\n\n-   [GitHub development version](https://lorenzwalthert.github.io/precommit/dev/).\n\n-   [UseR 2022 talk on pre-commit for R](https://www.youtube.com/watch?v=r3QXwfxQBLM\u0026t=1280s)\n\nThese only cover the functionality added on top of the pre-commit framework by this package. Everything else is covered in the extensive [online documentation](https://pre-commit.com) of the pre-commit framework itself, including how to create hooks for actions like `git push` or `git checkout`, create local hooks etc.\n","funding_links":["https://github.com/sponsors/lorenzwalthert"],"categories":["General"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/lorenzwalthert.github.io%2Fprecommit%2F","html_url":"https://awesome.ecosyste.ms/projects/lorenzwalthert.github.io%2Fprecommit%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/lorenzwalthert.github.io%2Fprecommit%2F/lists"}