mirror of https://github.com/harness/drone.git
parent
ffd999eaff
commit
7af28da479
|
@ -196,6 +196,7 @@ func (s GitnessSCM) ResolveCredentials(
|
|||
func (s GitnessSCM) GetFileContent(ctx context.Context,
|
||||
gitspaceConfig types.GitspaceConfig,
|
||||
filePath string,
|
||||
_ *ResolvedCredentials,
|
||||
) ([]byte, error) {
|
||||
repo, err := s.repoStore.FindByRef(ctx, *gitspaceConfig.CodeRepo.Ref)
|
||||
if err != nil {
|
||||
|
|
|
@ -55,6 +55,7 @@ func (s *GenericSCM) ListReporisotries(_ context.Context,
|
|||
func (s GenericSCM) GetFileContent(ctx context.Context,
|
||||
gitspaceConfig types.GitspaceConfig,
|
||||
filePath string,
|
||||
_ *ResolvedCredentials,
|
||||
) ([]byte, error) {
|
||||
gitWorkingDirectory := "/tmp/git/"
|
||||
cloneDir := gitWorkingDirectory + uuid.New().String()
|
||||
|
|
|
@ -130,7 +130,7 @@ func (s scm) GetSCMRepoDetails(
|
|||
ResolvedCredentials: resolvedCredentials,
|
||||
}
|
||||
|
||||
catFileOutputBytes, err := scmProvider.GetFileContent(ctx, gitspaceConfig, filePath)
|
||||
catFileOutputBytes, err := scmProvider.GetFileContent(ctx, gitspaceConfig, filePath, resolvedCredentials)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to read devcontainer file : %w", err)
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ type Provider interface {
|
|||
ctx context.Context,
|
||||
gitspaceConfig types.GitspaceConfig,
|
||||
filePath string,
|
||||
credentials *ResolvedCredentials,
|
||||
) ([]byte, error)
|
||||
ListReporisotries(ctx context.Context,
|
||||
filter *RepositoryFilter,
|
||||
|
|
Loading…
Reference in New Issue