Skip to content

Commit

Permalink
Merge pull request #418 from chmouel/issue-416-bitbucket-cloud-no-pro…
Browse files Browse the repository at this point in the history
…vider.user-has-been-set
  • Loading branch information
chmouel committed Feb 18, 2022
2 parents b2dc9e5 + ee19564 commit c708f33
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ Pipelines-As-Code has a full support on Bitbucket Cloud on

<https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/>

Add those permissions to the token :

![image](https://user-images.githubusercontent.com/98980/154526912-75c52ded-45e9-42d4-8c09-908b86eb57b4.png)

Make sure you note somewhere the generated token or otherwise you will have to
recreate it.

Expand Down
2 changes: 1 addition & 1 deletion pkg/pipelineascode/pipelineascode.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func Run(ctx context.Context, cs *params.Run, providerintf provider.Interface, k
return nil
}

if repo.Spec.GitProvider != nil && repo.Spec.GitProvider.URL != "" {
if repo.Spec.GitProvider != nil {
err := secretFromRepository(ctx, cs, k8int, providerintf.GetConfig(), repo)
if err != nil {
return err
Expand Down
10 changes: 7 additions & 3 deletions pkg/test/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,16 @@ func NewRepo(opts RepoTestcreationOpts) *v1alpha1.Repository {
},
Spec: v1alpha1.RepositorySpec{
URL: opts.URL,
GitProvider: &v1alpha1.GitProvider{
Secret: &v1alpha1.GitProviderSecret{},
},
},
Status: opts.RepoStatus,
}

if opts.SecretName != "" || opts.ProviderURL != "" {
repo.Spec.GitProvider = &v1alpha1.GitProvider{
Secret: &v1alpha1.GitProviderSecret{},
}
}

if opts.SecretName != "" {
repo.Spec.GitProvider.Secret = &v1alpha1.GitProviderSecret{
Name: opts.SecretName,
Expand Down

0 comments on commit c708f33

Please sign in to comment.