Skip to content

Commit

Permalink
docs: add mention of pre-commit issues (#139)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii authored Aug 25, 2023
1 parent 2108bc7 commit 88cd317
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Repo-review supports running multiple ways:
- [From the command line][cli] on a local folder (or multiple folders)
- From the command line on a remote repository on GitHub (`gh:org/repo@branch`)
- [From WebAssembly][webapp] in [Pyodide][] (example in `docs/index.html`)
- [From pre-commit][intro-pre-commit]
- [From pre-commit][intro-pre-commit] (see caveats there)
- [From GitHub Actions][intro-github-actions]
- [From Python][programmatic-usage]

Expand Down
15 changes: 14 additions & 1 deletion docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ You can also use this from pre-commit:
rev: <version>
hooks:
- id: repo-review
additional_dependencies: ["sp-repo-review==<version>"]
additional_dependencies: ["repo-review[cli]", "sp-repo-review==<version>"]
```

(Insert the current version above, and ideally pin the plugin version, as long
Expand All @@ -58,6 +58,19 @@ Though check your favorite plugin, which might directly support running from
pre-commit, and then pre-commit's pinning system will pin on your plugin,
rather than the framework (repo-review).

:::{warning}

This currently has a couple of weird quirks. Pre-commit will not report the
correct version for repo-review (it's always 0.1), and it will lose the `cli`
requirements if you add additional dependencies (which you always do, it's a
plugin framework, so it needs plugins). To counter this, plugins can avoid
lower bounds and you can manually add `repo-review[cli]`, as seen above, or
plugins can provide their own hooks (like sp-repo-review also does).

In the future, a mirror will be set up so that we can avoid these issues.

:::

## GitHub Actions

```yaml
Expand Down

0 comments on commit 88cd317

Please sign in to comment.