Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public static getDeployments = (
outputFormat: OUTPUT_FORMAT,
environment?: string,
imageTag?: string,
p1Id?: string,
commitId?: string,
service?: string,
deploymentId?: string
) => {
Deployment.getDeploymentsBasedOnFilters(
config.STORAGE_ACCOUNT_NAME,
config.STORAGE_ACCOUNT_KEY,
config.STORAGE_TABLE_NAME,
config.STORAGE_PARTITION_KEY,
srcPipeline,
hldPipeline,
clusterPipeline,
environment,
imageTag,
p1Id,
commitId,
service,
deploymentId
).then((deployments: Deployment[]) => {
if (outputFormat === OUTPUT_FORMAT.JSON) {
console.log(JSON.stringify(deployments));
public static getAuthorForCommitOrBuild(
commitId?: string,
buildId?: string,
callback?: (author?: IAuthor) => void
) {
Deployment.getDeploymentsBasedOnFilters(
config.STORAGE_ACCOUNT_NAME,
config.STORAGE_ACCOUNT_KEY,
config.STORAGE_TABLE_NAME,
config.STORAGE_PARTITION_KEY,
srcPipeline,
hldPipeline,
clusterPipeline,
undefined,
undefined,
buildId,
commitId,
undefined,
undefined
).then((deployments: Deployment[]) => {
if (deployments.length > 0 && callback) {
deployments[0].fetchAuthor(callback);