fix: double branch creation in public:bitbucket{Cloud,Server}:pull-request
Signed-off-by: RedlineTriad <39059512+RedlineTriad@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend-module-bitbucket-server': patch
|
||||
'@backstage/plugin-scaffolder-backend-module-bitbucket-cloud': patch
|
||||
---
|
||||
|
||||
Fix double branch creation in `public:bitbucket{Cloud,Server}:pull-request`
|
||||
This resulted in the following error when using the actions:
|
||||
|
||||
```
|
||||
AlreadyExistsError: Failed to create branch at create-test because it already exists.
|
||||
```
|
||||
|
||||
The issue was original introduced in d103a48fa306d745599dc0c793668c9e6a479d32
|
||||
-8
@@ -21,7 +21,6 @@ import {
|
||||
getRepoSourceDirectory,
|
||||
commitAndPushBranch,
|
||||
addFiles,
|
||||
createBranch as createGitBranch,
|
||||
cloneRepo,
|
||||
parseRepoUrl,
|
||||
} from '@backstage/plugin-scaffolder-node';
|
||||
@@ -412,13 +411,6 @@ export function createPublishBitbucketCloudPullRequestAction(options: {
|
||||
ref: sourceBranch,
|
||||
});
|
||||
|
||||
await createGitBranch({
|
||||
dir: tempDir,
|
||||
auth,
|
||||
logger: ctx.logger,
|
||||
ref: sourceBranch,
|
||||
});
|
||||
|
||||
// copy files
|
||||
fs.cpSync(sourceDir, tempDir, {
|
||||
recursive: true,
|
||||
|
||||
-8
@@ -24,7 +24,6 @@ import {
|
||||
getRepoSourceDirectory,
|
||||
commitAndPushBranch,
|
||||
addFiles,
|
||||
createBranch as createGitBranch,
|
||||
cloneRepo,
|
||||
parseRepoUrl,
|
||||
} from '@backstage/plugin-scaffolder-node';
|
||||
@@ -452,13 +451,6 @@ export function createPublishBitbucketServerPullRequestAction(options: {
|
||||
ref: sourceBranch,
|
||||
});
|
||||
|
||||
await createGitBranch({
|
||||
dir: tempDir,
|
||||
auth,
|
||||
logger: ctx.logger,
|
||||
ref: sourceBranch,
|
||||
});
|
||||
|
||||
// copy files
|
||||
fs.cpSync(sourceDir, tempDir, {
|
||||
recursive: true,
|
||||
|
||||
Reference in New Issue
Block a user