Skip to content

Commit 3d8012a

Browse files
committed
feedback
1 parent 72f3779 commit 3d8012a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

internal/exec/pro.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func uploadStatus(info *schema.ConfigAndStacksInfo, exitCode int, client pro.Atm
216216
}
217217

218218
// Get the git repository info
219-
repoInfo, err := gitRepo.GetLocalRepo()
219+
repoInfo, err := gitRepo.GetLocalRepoInfo()
220220
if err != nil {
221221
return fmt.Errorf(atmosErrors.ErrWrappingFormat, atmosErrors.ErrFailedToGetLocalRepo, err)
222222
}

internal/exec/pro_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type MockGitRepo struct {
3131
mock.Mock
3232
}
3333

34-
func (m *MockGitRepo) GetLocalRepo() (*atmosgit.RepoInfo, error) {
34+
func (m *MockGitRepo) GetLocalRepoInfo() (*atmosgit.RepoInfo, error) {
3535
args := m.Called()
3636
if args.Get(0) == nil {
3737
return nil, args.Error(1)
@@ -193,7 +193,7 @@ func TestUploadStatus(t *testing.T) {
193193
// The function only processes exit codes 0 and 2
194194
if tc.exitCode == 0 || tc.exitCode == 2 {
195195
// Set up mock expectations for git functions
196-
mockGitRepo.On("GetLocalRepo").Return(testRepoInfo, nil)
196+
mockGitRepo.On("GetLocalRepoInfo").Return(testRepoInfo, nil)
197197
mockGitRepo.On("GetCurrentCommitSHA").Return("abc123def456", nil)
198198

199199
// Set up mock expectations for pro client

pkg/git/git.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,16 @@ func GetRepoInfo(localRepo *git.Repository) (RepoInfo, error) {
110110

111111
// GitRepoInterface defines the interface for git repository operations.
112112
type GitRepoInterface interface {
113-
GetLocalRepo() (*RepoInfo, error)
113+
GetLocalRepoInfo() (*RepoInfo, error)
114114
GetRepoInfo(repo *git.Repository) (RepoInfo, error)
115115
GetCurrentCommitSHA() (string, error)
116116
}
117117

118118
// DefaultGitRepo is the default implementation of GitRepoInterface.
119119
type DefaultGitRepo struct{}
120120

121-
// GetLocalRepo returns information about the local git repository.
122-
func (d *DefaultGitRepo) GetLocalRepo() (*RepoInfo, error) {
121+
// GetLocalRepoInfo returns information about the local git repository.
122+
func (d *DefaultGitRepo) GetLocalRepoInfo() (*RepoInfo, error) {
123123
repo, err := GetLocalRepo()
124124
if err != nil {
125125
return nil, fmt.Errorf("%w: failed to get local repository: %v", errUtils.ErrFailedToGetLocalRepo, err)

0 commit comments

Comments
 (0)