Skip to content

Commit 66160b7

Browse files
committed
apply review suggestion
1 parent d14f439 commit 66160b7

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

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

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,11 @@ class ExpressionImpl extends AstNodeImpl, TExpressionNode {
374374

375375
bindingset[owner, repo, action_path]
376376
private string externalCompositeActionName(string owner, string repo, string action_path) {
377-
action_path.trim() = "" and result = owner.trim() + "/" + repo.trim()
378-
or
379-
not action_path.trim() = "" and
380-
result = owner.trim() + "/" + repo.trim() + "/" + action_path.trim()
377+
exists(string trimmed_path | trimmed_path = action_path.trim() |
378+
if trimmed_path = ""
379+
then result = owner.trim() + "/" + repo.trim()
380+
else result = owner.trim() + "/" + repo.trim() + "/" + trimmed_path
381+
)
381382
}
382383

383384
class CompositeActionImpl extends AstNodeImpl, TCompositeAction {

0 commit comments

Comments
 (0)