Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull Request generator not working for Bitbucket Cloud #20769

Open
3 tasks done
mpitt opened this issue Nov 12, 2024 · 0 comments
Open
3 tasks done

Pull Request generator not working for Bitbucket Cloud #20769

mpitt opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working version:2.13 Latest confirmed affected version is 2.13

Comments

@mpitt
Copy link

mpitt commented Nov 12, 2024

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

Using the Pull Request generator with Bitbucket Cloud results in the error

error listing repos: error unmarshalling json to type '[]BitbucketCloudPullRequest': json: cannot unmarshal object into Go struct field BitbucketCloudPullRequest.author of type string

It looks like the error can be traced to adding the author field with the wrong type in [1]: it was added as a string but in the Bitbucket Cloud API it's an object [2]

To Reproduce

Create an ApplicationSet with the Pull Request generator:

spec:
  generators:
    - pullRequest:
        bitbucket:
          basicAuth:
            passwordRef:
              key: password
              secretName: argocd-controller-secret
            username: Srv-CICD-Robot
          owner: REDACTED
          repo: REDACTED
        filters:
          - branchMatch: .*/.*REDACTED.*/.*
        requeueAfterSeconds: 60

Expected behavior

The PR generator can parse the Bitbucket API response, where the author field is an object and not a string.

Screenshots

N/A

Version

argocd: v2.13.0+347f221
  BuildDate: 2024-11-04T12:09:06Z
  GitCommit: 347f221adba5599ef4d5f12ee572b2c17d01db4d
  GitTreeState: clean
  GoVersion: go1.23.1
  Compiler: gc
  Platform: linux/amd64
argocd-server: v2.13.0+347f221

Logs

error listing repos: error unmarshalling json to type '[]BitbucketCloudPullRequest': json: cannot unmarshal object into Go struct field BitbucketCloudPullRequest.author of type string
@mpitt mpitt added the bug Something isn't working label Nov 12, 2024
@andrii-korotkov-verkada andrii-korotkov-verkada added the version:2.13 Latest confirmed affected version is 2.13 label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working version:2.13 Latest confirmed affected version is 2.13
Projects
None yet
Development

No branches or pull requests

2 participants