chore(comment): fix changeset and move gitlab error processing

Signed-off-by: Ilya Katlinski <ilya.katlinsky@gmail.com>
This commit is contained in:
Ilya Katlinski
2023-10-10 12:49:11 +02:00
parent b847ef3a1d
commit 0da78e017f
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
'@backstage/plugin-scaffolder-backend': minor
---
Updated `publish:gitlab`` action properties to support additional Gitlab project settings:
Updated `publish:gitlab` action properties to support additional Gitlab project settings:
- general project settings provided by gitlab project create API (new `settings` property)
- branch level settings to create additional branches and make them protected (new `branches` property)
@@ -251,7 +251,3 @@ export function getGitCommitMessage(
export function entityRefToName(name: string): string {
return name.replace(/^.*[:/]/g, '');
}
export function printGitlabError(error: any): string {
return JSON.stringify({ code: error.code, message: error.description });
}
@@ -18,7 +18,7 @@ import { InputError } from '@backstage/errors';
import { ScmIntegrationRegistry } from '@backstage/integration';
import { createTemplateAction } from '@backstage/plugin-scaffolder-node';
import { Gitlab } from '@gitbeaker/node';
import { initRepoAndPush, printGitlabError } from '../helpers';
import { initRepoAndPush } from '../helpers';
import { getRepoSourceDirectory, parseRepoUrl } from './util';
import { Config } from '@backstage/config';
import { examples } from './gitlab.examples';
@@ -468,3 +468,7 @@ export function createPublishGitlabAction(options: {
},
});
}
function printGitlabError(error: any): string {
return JSON.stringify({ code: error.code, message: error.description });
}