@@ -17,10 +17,19 @@ type BitbucketCloudService struct {
1717}
1818
1919type BitbucketCloudPullRequest struct {
20- ID int `json:"id"`
21- Title string `json:"title"`
22- Source BitbucketCloudPullRequestSource `json:"source"`
23- Author BitbucketCloudPullRequestAuthor `json:"author"`
20+ ID int `json:"id"`
21+ Title string `json:"title"`
22+ Source BitbucketCloudPullRequestSource `json:"source"`
23+ Author BitbucketCloudPullRequestAuthor `json:"author"`
24+ Destination BitbucketCloudPullRequestDestination `json:"destination"`
25+ }
26+
27+ type BitbucketCloudPullRequestDestination struct {
28+ Branch BitbucketCloudPullRequestDestinationBranch `json:"branch"`
29+ }
30+
31+ type BitbucketCloudPullRequestDestinationBranch struct {
32+ BitbucketCloudPullRequestSourceBranch
2433}
2534
2635type BitbucketCloudPullRequestSource struct {
@@ -136,11 +145,12 @@ func (b *BitbucketCloudService) List(_ context.Context) ([]*PullRequest, error)
136145 pullRequests := []* PullRequest {}
137146 for _ , pull := range pulls {
138147 pullRequests = append (pullRequests , & PullRequest {
139- Number : pull .ID ,
140- Title : pull .Title ,
141- Branch : pull .Source .Branch .Name ,
142- HeadSHA : pull .Source .Commit .Hash ,
143- Author : pull .Author .Nickname ,
148+ Number : pull .ID ,
149+ Title : pull .Title ,
150+ Branch : pull .Source .Branch .Name ,
151+ TargetBranch : pull .Destination .Branch .Name ,
152+ HeadSHA : pull .Source .Commit .Hash ,
153+ Author : pull .Author .Nickname ,
144154 })
145155 }
146156
0 commit comments