This repository was archived by the owner on Dec 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,12 @@ Add the following to your workflow config
1414 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1515` ` `
1616
17+ If you would prefer this action to not modify files for you, use the following config:
18+
19+ ` ` ` yaml
20+ - name : Use current action
21+ uses : getsentry/action-eslint-fix@v1
22+ with :
23+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24+ dry : true
25+ ` ` `
Original file line number Diff line number Diff line change 88 GITHUB_TOKEN :
99 description : ' GitHub token'
1010 required : true
11+ dry :
12+ description : Just runs eslint, doesn't commit any changes
13+ required : false
14+ default : false
1115runs :
1216 using : ' node12'
1317 main : ' dist/index.js'
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import {getChangedFiles} from './getChangedFiles'
99async function run ( ) : Promise < void > {
1010 try {
1111 const { owner, repo} = github . context . repo
12+ const dryRun = core . getInput ( 'dry' )
1213 const token = core . getInput ( 'GITHUB_TOKEN' )
1314
1415 if ( ! token ) {
@@ -69,6 +70,10 @@ async function run(): Promise<void> {
6970 core . setFailed ( err . message )
7071 }
7172
73+ if ( dryRun ) {
74+ return
75+ }
76+
7277 for ( const result of results ) {
7378 const filePath = result . filePath . replace (
7479 `${ process . env . GITHUB_WORKSPACE } /` ,
You can’t perform that action at this time.
0 commit comments