@@ -19,37 +19,26 @@ class ActionDeclaration extends File {
1919 getRelativePath ( ) .matches ( "%/action.yml" )
2020 }
2121
22- YAMLDocument getRootNode ( ) {
22+ YamlDocument getRootNode ( ) {
2323 result .getFile ( ) = this
2424 }
2525
2626 /**
2727 * The name of any input to this action.
2828 */
2929 string getAnInput ( ) {
30- result = getRootNode ( ) .( YAMLMapping ) .lookup ( "inputs" ) .( YAMLMapping ) .getKey ( _) .( YAMLString ) .getValue ( )
30+ result = getRootNode ( ) .( YamlMapping ) .lookup ( "inputs" ) .( YamlMapping ) .getKey ( _) .( YamlString ) .getValue ( )
3131 }
3232
3333 /**
3434 * The given input always has a value, either because it is required,
3535 * or because it has a default value.
3636 */
3737 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
4040 ( 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 ) )
5342 }
5443}
5544
0 commit comments