Apply suggestions from code review

Co-authored-by: Asger F <asgerf@github.com>
This commit is contained in:
Jaroslav Lobačevski
2023-05-09 16:27:32 +02:00
committed by GitHub
parent 5aa71352dc
commit 891a94c166

View File

@@ -18,7 +18,7 @@ module Actions {
(
f.getRelativePath().regexpMatch("(^|.*/)\\.github/workflows/.*\\.ya?ml$")
or
f.getBaseName() = "action.yml"
f.getBaseName() = ["action.yml", "action.yaml"]
)
)
}
@@ -30,7 +30,7 @@ module Actions {
*/
class CompositeAction extends Node, YamlDocument, YamlMapping {
CompositeAction() {
this.getFile().getBaseName() = "action.yml" and
this.getFile().getBaseName() = ["action.yml", "action.yaml"] and
this.lookup("runs").(YamlMapping).lookup("using").(YamlScalar).getValue() = "composite"
}