Skip to content

Commit

Permalink
existing mapSecrets string placeholder return
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Detering <[email protected]>
  • Loading branch information
TimeTravelerFromNow committed Sep 28, 2024
1 parent de94540 commit 6a26b6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/context/directory/handlers/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ function parse(context: DirectoryContext): ParsedActions {
}

function mapSecrets(secrets) {
if (typeof secrets === 'string') {
return secrets;
}
if (secrets && secrets.length > 0) {
return secrets.map((secret) => ({ name: secret.name, value: secret.value }));
}
Expand Down Expand Up @@ -74,7 +77,7 @@ function mapToAction(filePath, action): Partial<Action> {
runtime: action.runtime,
status: action.status,
dependencies: action.dependencies,
secrets: typeof action.secrets === 'string' ? action.secrets : mapSecrets(action.secrets || []),
secrets: mapSecrets(action.secrets),
supported_triggers: action.supported_triggers,
deployed: action.deployed || action.all_changes_deployed,
installed_integration_id: action.installed_integration_id,
Expand Down

0 comments on commit 6a26b6c

Please sign in to comment.