Merge pull request #3969 from titilambert/fix_gitlab_publisher
Fix gitlab scaffoler publisher
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': minor
|
||||
---
|
||||
|
||||
Fix gitlab scaffolder publisher
|
||||
@@ -51,7 +51,7 @@ describe('GitLab Publisher', () => {
|
||||
const result = await publisher.publish({
|
||||
values: {
|
||||
isOrg: true,
|
||||
storePath: 'blam/test',
|
||||
storePath: 'bloum/blam/test',
|
||||
owner: 'bob',
|
||||
},
|
||||
directory: '/tmp/test',
|
||||
@@ -82,7 +82,7 @@ describe('GitLab Publisher', () => {
|
||||
|
||||
const result = await publisher.publish({
|
||||
values: {
|
||||
storePath: 'blam/test',
|
||||
storePath: 'bloum/blam/test',
|
||||
owner: 'bob',
|
||||
},
|
||||
directory: '/tmp/test',
|
||||
|
||||
@@ -52,7 +52,10 @@ export class GitlabPublisher implements PublisherBase {
|
||||
private async createRemote(
|
||||
values: RequiredTemplateValues & Record<string, JsonValue>,
|
||||
) {
|
||||
const [owner, name] = values.storePath.split('/');
|
||||
const pathElements = values.storePath.split('/');
|
||||
const name = pathElements[pathElements.length - 1];
|
||||
pathElements.pop();
|
||||
const owner = pathElements.join('/');
|
||||
|
||||
let targetNamespace = ((await this.client.Namespaces.show(owner)) as {
|
||||
id: number;
|
||||
|
||||
Reference in New Issue
Block a user