Skip to content

Commit 0828474

Browse files
committed
Added Workflow::getName and Step::GetId
1 parent 2edeeaa commit 0828474

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

javascript/ql/lib/semmle/javascript/Actions.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ module Actions {
2828
/** Gets the `jobs` mapping from job IDs to job definitions in this workflow. */
2929
YAMLMapping getJobs() { result = this.lookup("jobs") }
3030

31+
/** Gets the name of the workflow */
32+
string getName() { result = this.lookup("name").(YAMLString).getValue() }
33+
3134
/** Gets the name of the workflow file. */
3235
string getFileName() { result = this.getFile().getBaseName() }
3336

@@ -129,6 +132,9 @@ module Actions {
129132

130133
/** Gets the value of the `if` field in this step, if any. */
131134
StepIf getIf() { result.getStep() = this }
135+
136+
/** Gets the id of the step field, if any. */
137+
string getId() { result = this.lookup("id").(YAMLString).getValue() }
132138
}
133139

134140
/**

0 commit comments

Comments
 (0)