File tree 3 files changed +12
-2
lines changed
3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ GitHub Action implementation of the [Laravel Pint](https://github.com/laravel/pi
6
6
7
7
Use with [ GitHub Actions] ( https://github.com/features/actions )
8
8
9
- _ .github/workflows/pint.yml
9
+ ` _.github/workflows/pint.yml `
10
10
11
- ```
11
+ ``` yml
12
12
name : PHP Linting
13
13
on : pull_request
14
14
jobs :
25
25
configPath : " vendor/my-company/coding-style/pint.json"
26
26
pintVersion : 1.8.0
27
27
onlyDirty : true
28
+ # onlyDiff: "origin/main"
28
29
29
30
```
30
31
ℹ️ Starting from version 2 you can specify the Pint version to be used by specifying a ` pintVersion ` in your configuration file.
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ inputs:
21
21
onlyDirty :
22
22
description : " only format changed files"
23
23
required : false
24
+
25
+ onlyDiff :
26
+ description : " only format changed files that differ from the provided branch"
27
+ required : false
24
28
25
29
pintVersion :
26
30
description : " laravel/pint composer version to install a specific version."
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ if [[ "${INPUT_PRESET}" ]]; then
31
31
pint_command+=" --preset ${INPUT_PRESET} "
32
32
fi
33
33
34
+ if [[ " ${INPUT_ONLYDIFF} " ]]; then
35
+ pint_command+=" --diff=${INPUT_ONLYDIFF} "
36
+ INPUT_ONLYDIRTY=false
37
+ fi
38
+
34
39
if [[ " ${INPUT_ONLYDIRTY} " == true ]]; then
35
40
pint_command+=" --dirty"
36
41
fi
You can’t perform that action at this time.
0 commit comments