Skip to content

Commit

Permalink
client: also auto-detect team based on resource namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
kimtore committed Sep 17, 2024
1 parent a7fa98b commit 51b06c3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/deployclient/deployclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,14 @@ func Prepare(ctx context.Context, cfg *Config) (*pb.DeploymentRequest, error) {
for i, path := range cfg.Resource {
team := detectTeam(resources[i])
if len(team) > 0 {
log.Infof("Detected team '%s' in path %s", team, path)
log.Infof("Detected team %q in %q", team, path)
cfg.Team = team
break
}

team = detectNamespace(resources[i])
if len(team) > 0 {
log.Infof("Detected team %q from namespace in %q", team, path)
cfg.Team = team
break
}
Expand Down

0 comments on commit 51b06c3

Please sign in to comment.