File tree 3 files changed +8
-0
lines changed
3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ outputs:
67
67
description : " The title to use if opening fixes as a new PR"
68
68
restyled-body :
69
69
description : " The body to use if opening fixes as a new PR"
70
+ suggestions-skipped :
71
+ description : " True if there were suggestions we had to skip"
70
72
71
73
runs :
72
74
using : " node20"
Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ async function run() {
98
98
core . info ( " " ) ;
99
99
}
100
100
101
+ let suggestionsSkipped = false ;
102
+
101
103
if ( inputs . suggestions && success ) {
102
104
const resolved = await clearPriorSuggestions ( client , pr ) ;
103
105
@@ -120,6 +122,7 @@ async function run() {
120
122
: `${ s . startLine } ` ;
121
123
const location = `${ s . path } :${ line } ` ;
122
124
core . warning ( `[${ location } ]: Skipping suggestion: ${ skipReason } ` ) ;
125
+ suggestionsSkipped = true ;
123
126
return Promise . resolve ( ) ;
124
127
} else {
125
128
n += 1 ;
@@ -140,6 +143,7 @@ async function run() {
140
143
restyledHead : `restyled/${ pr . headRef } ` ,
141
144
restyledTitle : `Restyled ${ pr . title } ` ,
142
145
restyledBody : pullRequestDescription ( pr . number ) ,
146
+ suggestionsSkipped,
143
147
} ) ;
144
148
145
149
if ( ec !== 0 ) {
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export type Outputs = {
23
23
restyledHead : string ;
24
24
restyledTitle : string ;
25
25
restyledBody : string ;
26
+ suggestionsSkipped : boolean ;
26
27
} ;
27
28
28
29
export function setOutputs ( outputs : Outputs ) : void {
@@ -33,4 +34,5 @@ export function setOutputs(outputs: Outputs): void {
33
34
core . setOutput ( "restyled-head" , outputs . restyledHead ) ;
34
35
core . setOutput ( "restyled-title" , outputs . restyledTitle ) ;
35
36
core . setOutput ( "restyled-body" , outputs . restyledBody ) ;
37
+ core . setOutput ( "suggestions-skipped" , outputs . suggestionsSkipped ) ;
36
38
}
You can’t perform that action at this time.
0 commit comments