Repository: evilmartians/lefthook (language: python)

Issue:
feat: add `files`, `all-files` and `commands` as flags
Closes #120

#### :zap: Summary

Adds `--all-files`, `--files`, and `--commands` to run lefthook on a subset of hooks and/or files in the repo.

New usage text:

```sh
$ lefthook run --help

Execute group of hooks

Usage:
  lefthook run hook-name [git args...] [flags]

Examples:
lefthook run pre-commit

Flags:
      --all-files          run hooks on all files
      --commands strings   run only specified commands
      --files strings      run on specified files. takes precedence over --all-files
  -h, --help               help for run
  -n, --no-tty             run hook non-interactively, disable spinner

Global Flags:
      --no-colors   disable colored output
  -v, --verbose     verbose output
```
#### :ballot_box_with_check: Checklist

- [x] Check locally
- [ ] Add tests
- [x] Add documentation

I'm not sure how to add a test for these - there aren't any existing tests that operate on the `cmd/run.go` level and test the whole flow – how would you like that to be done?


Discussion / hints:

Fix patch:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 29c8cf08..d70c65f8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,7 +4,7 @@ First off, thanks for taking the time to contribute! Feel free to make Pull Requ
 
 # Requirements
 
-Go >= 1.20.0
+Go >= 1.21.0
 
 # Process
 
diff --git a/README.md b/README.md
index 139ef3ce..2d2a5ce4 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ Fast and powerful Git hooks manager for Node.js, Ruby or any other type of proje
 
 ## Install
 
-With **Go** (>= 1.20):
+With **Go** (>= 1.21):
 
 ```bash
 go install github.com/evilmartians/lefthook@latest
diff --git a/go.mod b/go.mod
index 0fbe498a..efd10656 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
 module github.com/evilmartians/lefthook
 
-go 1.20
+go 1.21
 
 require (
 	github.com/MakeNowJust/heredoc v1.0.0


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 829bf0d0..e78f6669 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -9,7 +9,7 @@ jobs:
   test:
     strategy:
       matrix:
-        go-version: [1.20.x]
+        go-version: [1.21.x]
         os: [ubuntu-latest, macos-latest, windows-latest]
     runs-on: ${{ matrix.os }}
     steps:
@@ -31,7 +31,7 @@ jobs:
   test-integrity:
     strategy:
       matrix:
-        go-version: [1.20.x]
+        go-version: [1.21.x]
         os: [ubuntu-latest, macos-latest]
     runs-on: ${{ matrix.os }}
     env:
@@ -66,7 +66,7 @@ jobs:
       - name: Install Go
         uses: actions/setup-go@v2
         with:
-          go-version: 1.20.x
+          go-version: 1.21.x
       - name: Checkout code
         uses: actions/checkout@v2
       - name: Build binaries
@@ -91,5 +91,5 @@ jobs:
     steps:
       - uses: coverallsapp/github-action@v2
         with:
-          carryforward: "integration-1.20.x ubuntu-latest,integration-1.20.x macos-latest,1.20.x ubuntu-latest,1.20.x macos-latest,1.20.x windows-latest"
+          carryforward: "integration-1.21.x ubuntu-latest,integration-1.21.x macos-latest,1.21.x ubuntu-latest,1.21.x macos-latest,1.21.x windows-latest"
           parallel-finished: true