@@ -149,7 +149,7 @@ class JobStmt extends Statement instanceof Actions::Job {
149
149
* out1: ${steps.foo.bar}
150
150
* out2: ${steps.foo.baz}
151
151
*/
152
- JobOutputStmt getOutputStmt ( ) { result = this .( Actions:: Job ) .lookup ( "outputs" ) }
152
+ OutputsStmt getOutputsStmt ( ) { result = this .( Actions:: Job ) .lookup ( "outputs" ) }
153
153
154
154
/**
155
155
* Reusable workflow jobs may have Uses children
@@ -166,28 +166,6 @@ class JobStmt extends Statement instanceof Actions::Job {
166
166
}
167
167
}
168
168
169
- /**
170
- * Declaration of the outputs for the job.
171
- * eg:
172
- * out1: ${steps.foo.bar}
173
- * out2: ${steps.foo.baz}
174
- */
175
- class JobOutputStmt extends Statement instanceof YamlMapping {
176
- JobStmt job ;
177
-
178
- JobOutputStmt ( ) { job .( YamlMapping ) .lookup ( "outputs" ) = this }
179
-
180
- YamlMapping asYamlMapping ( ) { result = this }
181
-
182
- /**
183
- * Gets a specific value expression
184
- * eg: ${steps.foo.bar}
185
- */
186
- Expression getOutputExpr ( string id ) {
187
- this .( YamlMapping ) .maps ( any ( YamlScalar s | s .getValue ( ) = id ) , result )
188
- }
189
- }
190
-
191
169
/**
192
170
* A Step is a single task that can be executed as part of a job.
193
171
*/
@@ -435,9 +413,9 @@ class NeedsCtxAccessExpr extends CtxAccessExpr {
435
413
job .getLocation ( ) .getFile ( ) = this .getLocation ( ) .getFile ( ) and
436
414
(
437
415
// regular jobs
438
- job .getOutputStmt ( ) . getOutputExpr ( fieldName ) = result
416
+ job .getOutputsStmt ( ) = result
439
417
or
440
- // jobs calling reusable workflows
418
+ // reusable workflow calling jobs
441
419
job .getUsesExpr ( ) = result
442
420
)
443
421
}
@@ -464,7 +442,7 @@ class JobsCtxAccessExpr extends CtxAccessExpr {
464
442
exists ( JobStmt job |
465
443
job .getId ( ) = jobId and
466
444
job .getLocation ( ) .getFile ( ) = this .getLocation ( ) .getFile ( ) and
467
- job .getOutputStmt ( ) . getOutputExpr ( fieldName ) = result
445
+ job .getOutputsStmt ( ) = result
468
446
)
469
447
}
470
448
}
0 commit comments