File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,18 @@ This repository contains the **autofix.ci** GitHub Action.
771 . Install the [ autofix.ci GitHub App] ( https://autofix.ci ) for your repository.
882 . Add this action at the end of your code-formatting CI job.
99 See [ autofix.ci/setup] ( https://autofix.ci/setup ) for examples!
10+
11+ ## Customization
12+
13+ See [ action.yml] ( ./action.yml ) for a list of all the available inputs and outputs.
14+ You can pass inputs like this:
15+
16+ ``` yaml
17+ - uses : autofix-ci/action@hash
18+ with :
19+ fail-fast : false
20+ ` ` `
21+
1022## Badge
1123
1224[](https://autofix.ci)
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ branding:
44 icon : ' check-circle'
55 color : ' green'
66runs :
7- using : ' node16 '
7+ using : ' node20 '
88 main : ' index.js'
99inputs :
1010 fail-fast :
@@ -14,3 +14,8 @@ inputs:
1414 commit-message :
1515 description : ' The commit message to use when fixing a commit.'
1616 required : false
17+ outputs :
18+ autofix_started :
19+ description : |
20+ Boolean indicating whether changes have been sent to the autofix server
21+ and a fix commit is coming up.
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ const fs = require("fs");
66
77async function run ( ) {
88 try {
9+ core . setOutput ( 'autofix_started' , false ) ;
10+
911 if ( process . env . GITHUB_WORKFLOW !== "autofix.ci" ) {
1012 throw new Error ( `For security reasons, the workflow in which the autofix.ci action is used must be named "autofix.ci".` ) ;
1113 }
@@ -103,6 +105,7 @@ async function run() {
103105 const body = await resp . readBody ( ) ;
104106 if ( resp . message . statusCode === 200 ) {
105107 core . setFailed ( "✅ Autofix task started." ) ;
108+ core . setOutput ( 'autofix_started' , true ) ;
106109 } else {
107110 console . log ( resp . message . statusCode , body ) ;
108111 core . setFailed ( body ) ;
You can’t perform that action at this time.
0 commit comments