File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
src/plus/integrations/providers Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,17 @@ export class BitbucketIntegration extends HostingIntegration<
3535 }
3636
3737 protected override async mergeProviderPullRequest (
38- _session : AuthenticationSession ,
39- _pr : PullRequest ,
40- _options ?: {
38+ { accessToken } : AuthenticationSession ,
39+ pr : PullRequest ,
40+ options ?: {
4141 mergeMethod ?: PullRequestMergeMethod ;
4242 } ,
4343 ) : Promise < boolean > {
44- return Promise . resolve ( false ) ;
44+ const api = await this . getProvidersApi ( ) ;
45+ return api . mergePullRequest ( this . id , pr , {
46+ accessToken : accessToken ,
47+ mergeMethod : options ?. mergeMethod ,
48+ } ) ;
4549 }
4650
4751 protected override async getProviderAccountForCommit (
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import type {
3636 GetReposForAzureProjectFn ,
3737 GetReposOptions ,
3838 IssueFilter ,
39+ MergePullRequestFn ,
3940 PageInfo ,
4041 PagingMode ,
4142 ProviderAccount ,
@@ -207,6 +208,9 @@ export class ProvidersApi {
207208 getPullRequestsForRepoFn : providerApis . bitbucket . getPullRequestsForRepo . bind (
208209 providerApis . bitbucket ,
209210 ) as GetPullRequestsForRepoFn ,
211+ mergePullRequestFn : providerApis . bitbucket . mergePullRequest . bind (
212+ providerApis . bitbucket ,
213+ ) as MergePullRequestFn ,
210214 } ,
211215 [ HostingIntegrationId . AzureDevOps ] : {
212216 ...providersMetadata [ HostingIntegrationId . AzureDevOps ] ,
You can’t perform that action at this time.
0 commit comments