Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb7186f0

Browse files
committed
Pint --diff arg
1 parent80d3ca3 commitb7186f0

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ GitHub Action implementation of the [Laravel Pint](https://github.com/laravel/pi
66

77
Use with[GitHub Actions](https://github.com/features/actions)
88

9-
_.github/workflows/pint.yml
9+
`_.github/workflows/pint.yml`
1010

11-
```
11+
```yml
1212
name:PHP Linting
1313
on:pull_request
1414
jobs:
@@ -25,6 +25,7 @@ jobs:
2525
configPath:"vendor/my-company/coding-style/pint.json"
2626
pintVersion:1.8.0
2727
onlyDirty:true
28+
# onlyDiff: "origin/main"
2829

2930
```
3031
ℹ️ Starting from version 2 you can specify the Pint version to be used by specifying a`pintVersion` in your configuration file.

‎action.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ inputs:
2121
onlyDirty:
2222
description:"only format changed files"
2323
required:false
24+
25+
onlyDiff:
26+
description:"only format changed files that differ from the provided branch"
27+
required:false
2428

2529
pintVersion:
2630
description:"laravel/pint composer version to install a specific version."

‎entrypoint.sh‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ if [[ "${INPUT_PRESET}" ]]; then
3131
pint_command+=" --preset${INPUT_PRESET}"
3232
fi
3333

34+
if [["${INPUT_ONLYDIFF}" ]];then
35+
pint_command+=" --diff=${INPUT_ONLYDIFF}"
36+
INPUT_ONLYDIRTY=false
37+
fi
38+
3439
if [["${INPUT_ONLYDIRTY}"==true ]];then
3540
pint_command+=" --dirty"
3641
fi

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp