@@ -19,37 +19,26 @@ class ActionDeclaration extends File {
19
19
getRelativePath ( ) .matches ( "%/action.yml" )
20
20
}
21
21
22
- YAMLDocument getRootNode ( ) {
22
+ YamlDocument getRootNode ( ) {
23
23
result .getFile ( ) = this
24
24
}
25
25
26
26
/**
27
27
* The name of any input to this action.
28
28
*/
29
29
string getAnInput ( ) {
30
- result = getRootNode ( ) .( YAMLMapping ) .lookup ( "inputs" ) .( YAMLMapping ) .getKey ( _) .( YAMLString ) .getValue ( )
30
+ result = getRootNode ( ) .( YamlMapping ) .lookup ( "inputs" ) .( YamlMapping ) .getKey ( _) .( YamlString ) .getValue ( )
31
31
}
32
32
33
33
/**
34
34
* The given input always has a value, either because it is required,
35
35
* or because it has a default value.
36
36
*/
37
37
predicate inputAlwaysHasValue ( string input ) {
38
- exists ( YAMLMapping value |
39
- value = getRootNode ( ) .( YAMLMapping ) .lookup ( "inputs" ) .( YAMLMapping ) .lookup ( input ) and
38
+ exists ( YamlMapping value |
39
+ value = getRootNode ( ) .( YamlMapping ) .lookup ( "inputs" ) .( YamlMapping ) .lookup ( input ) and
40
40
( exists ( value .lookup ( "default" ) ) or
41
- value .lookup ( "required" ) .( YAMLBool ) .getBoolValue ( ) = true ) )
42
- }
43
-
44
- /**
45
- * The function that is the entrypoint to this action.
46
- */
47
- FunctionDeclStmt getEntrypoint ( ) {
48
- result .getFile ( ) .getRelativePath ( ) = getRootNode ( ) .
49
- ( YAMLMapping ) .lookup ( "runs" ) .
50
- ( YAMLMapping ) .lookup ( "main" ) .
51
- ( YAMLString ) .getValue ( ) .regexpReplaceAll ( "\\.\\./lib/(.*)\\.js" , "src/$1.ts" ) and
52
- result .getName ( ) = "run"
41
+ value .lookup ( "required" ) .( YamlBool ) .getBoolValue ( ) = true ) )
53
42
}
54
43
}
55
44
0 commit comments