Use the correct parameter to create a public repository in Bitbucket Server for the v2 templates
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Use the correct parameter to create a public repository in Bitbucket Server for the v2 templates
|
||||
@@ -140,7 +140,7 @@ describe('publish:bitbucket', () => {
|
||||
'https://hosted.bitbucket.com/rest/api/1.0/projects/owner/repos',
|
||||
(req, res, ctx) => {
|
||||
expect(req.headers.get('Authorization')).toBe('Bearer thing');
|
||||
expect(req.body).toEqual({ is_private: true, name: 'repo' });
|
||||
expect(req.body).toEqual({ public: false, name: 'repo' });
|
||||
return res(
|
||||
ctx.status(201),
|
||||
ctx.set('Content-Type', 'application/json'),
|
||||
|
||||
@@ -19,10 +19,10 @@ import {
|
||||
BitbucketIntegrationConfig,
|
||||
ScmIntegrationRegistry,
|
||||
} from '@backstage/integration';
|
||||
import { initRepoAndPush } from '../../../stages/publish/helpers';
|
||||
import { getRepoSourceDirectory, parseRepoUrl } from './util';
|
||||
import fetch from 'cross-fetch';
|
||||
import { initRepoAndPush } from '../../../stages/publish/helpers';
|
||||
import { createTemplateAction } from '../../createTemplateAction';
|
||||
import { getRepoSourceDirectory, parseRepoUrl } from './util';
|
||||
|
||||
const createBitbucketCloudRepository = async (opts: {
|
||||
owner: string;
|
||||
@@ -102,7 +102,7 @@ const createBitbucketServerRepository = async (opts: {
|
||||
body: JSON.stringify({
|
||||
name: repo,
|
||||
description: description,
|
||||
is_private: repoVisibility === 'private',
|
||||
public: repoVisibility === 'public',
|
||||
}),
|
||||
headers: {
|
||||
Authorization: authorization,
|
||||
|
||||
Reference in New Issue
Block a user