Skip to content

Commit 0add8f7

Browse files
committed
fix: bitbucket action
1 parent 95e0872 commit 0add8f7

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- action/**
88
branches:
99
- main
10+
- bitbucket
1011

1112
jobs:
1213
docker:

action/src/flows/in-branch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ export class InBranchFlow extends IntegrationFlow {
6363
execSync(`git config user.name "${gitConfig.userName}"`);
6464
execSync(`git config user.email "${gitConfig.userEmail}"`);
6565

66+
this.platformKit?.gitConfig();
67+
6668
execSync(`git fetch origin ${baseBranchName}`, { stdio: "inherit" });
6769
execSync(`git checkout ${baseBranchName} --`, { stdio: "inherit" });
6870

@@ -73,8 +75,6 @@ export class InBranchFlow extends IntegrationFlow {
7375
return false;
7476
}
7577

76-
this.platformKit?.gitConfig();
77-
7878
const workingDir = path.resolve(process.cwd(), this.platformKit.config.workingDir);
7979
if (workingDir !== process.cwd()) {
8080
this.ora.info(`Changing to working directory: ${this.platformKit.config.workingDir}`);

action/src/platforms/bitbucket.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ export class BitbucketPlatformKit extends PlatformKit<BitbucketConfig> {
9292
}
9393

9494
async gitConfig() {
95-
execSync("git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://host.docker.internal:29418/");
95+
execSync("git config --unset http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy", {
96+
stdio: "inherit",
97+
});
98+
execSync("git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://host.docker.internal:29418/", {
99+
stdio: "inherit",
100+
});
96101
}
97102

98103
get platformConfig() {

0 commit comments

Comments
 (0)