File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,21 @@ export class Job {
5151 public toJSON ( ) : Record < string , unknown > {
5252 return {
5353 "runs-on" : this . _config . runsOn ,
54- permissions : permissionsJSON ( this . _config . permissions ) ,
55- "timeout-minutes" : this . _config . timeoutMinutes ,
56- outputs : this . _config . outputs ,
57- needs : this . _config . needs ,
58- if : this . _config . if ,
54+
55+ ...( this . _config . permissions && {
56+ permissions : permissionsJSON ( this . _config . permissions ) ,
57+ } ) ,
58+
59+ ...( this . _config . timeoutMinutes && {
60+ "timeout-minutes" : this . _config . timeoutMinutes ,
61+ } ) ,
62+
63+ ...( this . _config . outputs && { outputs : this . _config . outputs } ) ,
64+
65+ ...( this . _config . needs && { needs : this . _config . needs } ) ,
66+
67+ ...( this . _config . if && { if : this . _config . if } ) ,
68+
5969 steps : this . _steps . map ( ( step ) => stepJSON ( step ) ) ,
6070 } ;
6171 }
You can’t perform that action at this time.
0 commit comments