Skip to content

Commit 8849e56

Browse files
authored
Merge pull request #5 from JKHarley/main
Allow `--dirty` argument
2 parents 5c0b1f6 + c412b9a commit 8849e56

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
testMode: true
2525
configPath: "vendor/my-company/coding-style/pint.json"
2626
pintVersion: 1.2.1
27+
onlyDirty: true
2728
2829
```
2930
ℹ️ Starting from version 2 you can specify the Pint version to be used by specifyling a `pintVersion` in your configuration file.

action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ inputs:
1717
preset:
1818
description: "pint preset"
1919
required: false
20+
21+
onlyDirty:
22+
description: "only format changed files"
23+
required: false
2024

2125
pintVersion:
22-
description: "larave/pint composer version to install a specific version."
26+
description: "laravel/pint composer version to install a specific version."
2327
required: false
2428
runs:
2529
using: 'docker'
@@ -29,6 +33,7 @@ runs:
2933
- ${{ inputs.verbose-mode }}
3034
- ${{ inputs.config-path }}
3135
- ${{ inputs.preset }}
36+
- ${{ inputs.only-dirty }}
3237
- ${{ inputs.pint-version }}
3338
branding:
3439
icon: 'eye'

entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ if [[ "${INPUT_PRESET}" ]]; then
2828
pint_command+=" --preset ${INPUT_PRESET}"
2929
fi
3030

31+
if [[ "${INPUT_ONLYDIRTY}" ]]; then
32+
pint_command+=" --dirty"
33+
fi
34+
3135
echo "Running Command: " "${pint_install_command[@]}"
3236

3337
${pint_install_command[@]}

0 commit comments

Comments
 (0)