File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { Octokit } from "octokit";
22import { PlatformKit } from "./_base.js" ;
33import Z from "zod" ;
44
5- import { configureGitCredentials } from "./git-utils.js " ;
5+ import { execSync } from "child_process " ;
66
77export class GitHubPlatformKit extends PlatformKit {
88 private _octokit ?: Octokit ;
@@ -77,9 +77,11 @@ export class GitHubPlatformKit extends PlatformKit {
7777 if ( ghToken && processOwnCommits ) {
7878 console . log ( "Using provided GH_TOKEN. This will trigger your CI/CD pipeline to run again." ) ;
7979
80- const URL = `https://${ ghToken } @github.com/${ repositoryOwner } /${ repositoryName } .git` ;
80+ const url = `https://${ ghToken } @github.com/${ repositoryOwner } /${ repositoryName } .git` ;
8181
82- configureGitCredentials ( ghToken , URL ) ;
82+ execSync ( `git remote set-url origin ${ url } ` , {
83+ stdio : "inherit" ,
84+ } ) ;
8385 }
8486 }
8587
Original file line number Diff line number Diff line change 11import { Gitlab } from "@gitbeaker/rest" ;
22import Z from "zod" ;
33import { PlatformKit } from "./_base.js" ;
4- import { configureGitCredentials } from "./git-utils.js " ;
4+ import { execSync } from "child_process " ;
55
66const gl = new Gitlab ( { token : "" } ) ;
77
@@ -91,9 +91,11 @@ export class GitlabPlatformKit extends PlatformKit {
9191 }
9292
9393 gitConfig ( ) : Promise < void > | void {
94- const URL = `https://oauth2:${ this . platformConfig . glToken } @gitlab.com/${ this . platformConfig . repositoryOwner } /${ this . platformConfig . repositoryName } .git` ;
94+ const url = `https://oauth2:${ this . platformConfig . glToken } @gitlab.com/${ this . platformConfig . repositoryOwner } /${ this . platformConfig . repositoryName } .git` ;
9595
96- configureGitCredentials ( this . platformConfig . glToken , URL ) ;
96+ execSync ( `git remote set-url origin ${ url } ` , {
97+ stdio : "inherit" ,
98+ } ) ;
9799 }
98100
99101 buildPullRequestUrl ( pullRequestNumber : number ) : string {
You can’t perform that action at this time.
0 commit comments