Sort secrets

This commit is contained in:
Christopher Schleiden
2023-01-11 11:27:34 -08:00
parent 4ff09b2a8a
commit 28aac582c2
@@ -47,12 +47,18 @@ export function contextProviders(
const secrets = await getSecrets(octokit, cache, repo, environmentName); const secrets = await getSecrets(octokit, cache, repo, environmentName);
defaultContext = defaultContext || new DescriptionDictionary(); defaultContext = defaultContext || new DescriptionDictionary();
secrets.repoSecrets.forEach(secret => secrets.repoSecrets
defaultContext!.add(secret.value, new data.StringData("***"), "Repository secret") .sort((a, b) => a.value.localeCompare(b.value))
); .forEach(secret => defaultContext!.add(secret.value, new data.StringData("***"), "Repository secret"));
secrets.environmentSecrets.forEach(secret => secrets.environmentSecrets
defaultContext!.add(secret.value, new data.StringData("***"), `Secret for environment \`${environmentName}\``) .sort((a, b) => a.value.localeCompare(b.value))
); .forEach(secret =>
defaultContext!.add(
secret.value,
new data.StringData("***"),
`Secret for environment \`${environmentName}\``
)
);
return defaultContext; return defaultContext;
} }
case "steps": { case "steps": {