Skip to content

Commit 658a065

Browse files
committed
Document external Actions model helpers
Add QLDoc for external workflow and composite-action model bindings, classifications, and callable-name resolution.
1 parent 558a0e0 commit 658a065

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • actions/ql/lib/codeql/actions/ast/internal

actions/ql/lib/codeql/actions/ast/internal/Ast.qll

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,10 @@ class CompositeActionImpl extends AstNodeImpl, TCompositeAction {
423423
)
424424
}
425425

426+
/**
427+
* Holds if this composite action is described by an external composite action model with the
428+
* given repository, action, revision, and local path details.
429+
*/
426430
predicate hasExternalCompositeActionModel(
427431
string owner, string repo, string action_path, string requested_ref, string resolved_commit_sha,
428432
string local_path
@@ -432,6 +436,7 @@ class CompositeActionImpl extends AstNodeImpl, TCompositeAction {
432436
local_path.trim() = this.getLocation().getFile().getRelativePath()
433437
}
434438

439+
/** Holds if this composite action was downloaded from an external repository. */
435440
predicate isExternalCompositeAction() {
436441
this.hasExternalCompositeActionModel(_, _, _, _, _, _)
437442
or
@@ -570,6 +575,10 @@ class ReusableWorkflowImpl extends AstNodeImpl, WorkflowImpl {
570575
)
571576
}
572577

578+
/**
579+
* Holds if this reusable workflow is described by an external reusable workflow model with the
580+
* given repository, workflow, revision, and local path details.
581+
*/
573582
predicate hasExternalReusableWorkflowModel(
574583
string owner, string repo, string workflow_path, string requested_ref,
575584
string resolved_commit_sha, string local_path
@@ -579,6 +588,7 @@ class ReusableWorkflowImpl extends AstNodeImpl, WorkflowImpl {
579588
local_path.trim() = this.getLocation().getFile().getRelativePath()
580589
}
581590

591+
/** Holds if this reusable workflow was downloaded from an external repository. */
582592
predicate isExternalReusableWorkflow() {
583593
this.hasExternalReusableWorkflowModel(_, _, _, _, _, _)
584594
or
@@ -1381,6 +1391,7 @@ class EnvImpl extends AstNodeImpl, TEnvNode {
13811391
abstract class UsesImpl extends AstNodeImpl {
13821392
abstract string getCallee();
13831393

1394+
/** Gets the canonical name used to resolve this `uses` element to its callable target. */
13841395
abstract string getCallableName();
13851396

13861397
abstract ScalarValueImpl getCalleeNode();

0 commit comments

Comments
 (0)