Skip to content

Commit

Permalink
feat: include git commit in schema
Browse files Browse the repository at this point in the history
fixes: #3277
  • Loading branch information
stuartwdouglas committed Mar 5, 2025
1 parent df46edf commit 22fcfcc
Show file tree
Hide file tree
Showing 12 changed files with 1,557 additions and 1,244 deletions.
5 changes: 5 additions & 0 deletions backend/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ func Start(ctx context.Context, config Config, storage *artefacts.OCIArtefactSer
}

module, err := svc.getModule(ctx, config.Deployment)
for git := range slices.FilterVariants[*schema.MetadataGit, schema.Metadata](module.Metadata) {
logger = logger.Attrs(map[string]string{"git-commit": git.Commit})
ctx = log.ContextWithLogger(ctx, logger)
break
}
if err != nil {
return fmt.Errorf("failed to get module: %w", err)
}
Expand Down
Loading

0 comments on commit 22fcfcc

Please sign in to comment.