feat: [CDE-358]: Setting initial value of has_git_changes from last gitspace instance if it exists. (#2770)

* feat: [CDE-358]: Setting initial value of has_git_changes from last gitspace instance if it exists.
This commit is contained in:
Dhruv Dhruv 2024-10-04 09:39:58 +00:00 committed by Harness
parent f9d8b647f1
commit 4e2c9fae28

View File

@ -147,6 +147,11 @@ func (c *Service) StartGitspaceAction(
if err != nil {
return err
}
if savedGitspaceInstance != nil {
gitspaceInstance.HasGitChanges = savedGitspaceInstance.HasGitChanges
}
if err = c.gitspaceInstanceStore.Create(ctx, gitspaceInstance); err != nil {
return fmt.Errorf("failed to create gitspace instance for %s %w", config.Identifier, err)
}