Skip to content

Commit 959a3d7

Browse files
Fixes merge PR not working with GLSM
1 parent 84f3e92 commit 959a3d7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/plus/integrations/providers/gitlab.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ abstract class GitLabIntegrationBase<
363363
}
364364

365365
protected override async mergeProviderPullRequest(
366-
_session: AuthenticationSession,
366+
{ accessToken }: AuthenticationSession,
367367
pr: PullRequest,
368368
options?: {
369369
mergeMethod?: PullRequestMergeMethod;
@@ -379,6 +379,7 @@ abstract class GitLabIntegrationBase<
379379
...options,
380380
isPAT: isEnterprise,
381381
baseUrl: isEnterprise ? `https://${this.domain}` : undefined,
382+
accessToken: accessToken,
382383
});
383384
return res;
384385
} catch (ex) {

src/plus/integrations/providers/providersApi.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,12 +721,17 @@ export class ProvidersApi {
721721
providerId: IntegrationId,
722722
pr: PullRequest,
723723
options?: {
724+
accessToken?: string;
724725
mergeMethod?: PullRequestMergeMethod;
725726
isPAT?: boolean;
726727
baseUrl?: string;
727728
},
728729
): Promise<boolean> {
729-
const { provider, token } = await this.ensureProviderTokenAndFunction(providerId, 'mergePullRequestFn');
730+
const { provider, token } = await this.ensureProviderTokenAndFunction(
731+
providerId,
732+
'mergePullRequestFn',
733+
options?.accessToken,
734+
);
730735
const headRef = pr.refs?.head;
731736
if (headRef == null) return false;
732737

0 commit comments

Comments
 (0)