File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,20 @@ This does a few things:
41
41
42
42
Hopefully in the future when `actions` matures the yaml can be simplified.
43
43
44
+ # ## using this action with custom invocations
45
+
46
+ By default, this action runs all the hooks against all the files. `extra_args`
47
+ lets users specify a single hook id and/or options to pass to `pre-commit run`.
48
+
49
+ Here's a sample step configuration that only runs the `flake8` hook against all
50
+ the files (use the template above except for the `pre-commit` action) :
51
+
52
+ ` ` ` yaml
53
+ - uses: pre-commit/[email protected]
54
+ with:
55
+ extra_args: flake8 --all-files
56
+ ` ` `
57
+
44
58
# ## using this action in private repositories
45
59
46
60
this action also provides an additional behaviour when used in private
Original file line number Diff line number Diff line change 1
1
name : pre-commit
2
2
description : run pre-commit and optionally commit back to the pull request
3
3
inputs :
4
+ extra_args :
5
+ description : options to pass to pre-commit run
6
+ required : false
7
+ default : ' --all-files'
4
8
token :
5
9
description : github token to clone / push with
6
10
required : false
You can’t perform that action at this time.
0 commit comments