Skip to content

Commit

Permalink
Merge pull request #8 from martijnvdp/cleanup
Browse files Browse the repository at this point in the history
cleanup code
  • Loading branch information
martijnvdp authored Mar 6, 2023
2 parents 37b47a5 + 991d0cd commit e2eadd0
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions pkg/lambda/lambda.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,9 @@ func Start(ctx context.Context, event LambdaEvent) (response, error) {
"Error creating ECR client:")
}

switch {
// if Repositories is set, get sync options from tags for the specified repositories arns
case len(event.Repositories) > 0:
names := ecrRepoNamesFromAWSARNs(event.Repositories, environmentVars.awsRegion, environmentVars.awsAccount)
repositories, err = svc.getinputRepositorysFromTags(names)
// default case, lookup all configured repositories
default:
repositories, err = svc.getinputRepositorysFromTags(nil)
}
names := ecrRepoNamesFromAWSARNs(event.Repositories, environmentVars.awsRegion, environmentVars.awsAccount)
repositories, err = svc.getinputRepositorysFromTags(names)

if err != nil {
return returnErr(err, environmentVars.slackOAuthToken, event.SlackChannelID, errSubject,
"Error getting input images from tags")
Expand Down

0 comments on commit e2eadd0

Please sign in to comment.