diff --git a/plugins/scaffolder-backend-module-gitlab/README.md b/plugins/scaffolder-backend-module-gitlab/README.md index b4cc3e9459..a6277d4387 100644 --- a/plugins/scaffolder-backend-module-gitlab/README.md +++ b/plugins/scaffolder-backend-module-gitlab/README.md @@ -20,9 +20,9 @@ Configure the action: // packages/backend/src/plugins/scaffolder.ts import { - createGitlabProjectVariable, - createGitlabProjectAccessToken, - createGitlabProjectDeployToken, + createGitlabProjectAccessTokenAction, + createGitlabProjectAccessTokenAction, + createGitlabProjectDeployTokenAction, } from '@backstage/plugin-scaffolder-backend-module-gitlab'; // Create BuiltIn Actions @@ -36,13 +36,13 @@ const builtInActions = createBuiltinActions({ // Add Gitlab Actions const actions = [ ...builtInActions, - createGitlabProjectVariable({ + createGitlabProjectAccessTokenAction({ integrations: integrations, }), - createGitlabProjectAccessToken({ + createGitlabProjectAccessTokenAction({ integrations: integrations, }), - createGitlabProjectDeployToken({ + createGitlabProjectDeployTokenAction({ integrations: integrations, }), ]; @@ -116,7 +116,7 @@ spec: - id: gitlab-deploy-token name: Create Deploy Token - action: gitlab:create-project-deploy-token + action: gitlab:pdt:create input: repoUrl: ${{ parameters.repoUrl }} projectId: "${{ steps['publish'].output.projectId }}" @@ -126,7 +126,7 @@ spec: - id: gitlab-access-token name: Gitlab Access Token - action: gitlab:create-project-access-token + action: gitlab:pat:create input: repoUrl: ${{ parameters.repoUrl }} projectId: "${{ steps['publish-manifest'].output.projectId }}" @@ -136,7 +136,7 @@ spec: - id: gitlab-project-variable name: Manifest CI/CD Variable - action: gitlab:create-project-variable + action: gitlab:pv:create input: repoUrl: ${{ parameters.repoUrl }} projectId: "${{ steps['publish'].output.projectId }}" diff --git a/plugins/scaffolder-backend-module-gitlab/api-report.md b/plugins/scaffolder-backend-module-gitlab/api-report.md index 0e2ef92c3c..6db732fdcc 100644 --- a/plugins/scaffolder-backend-module-gitlab/api-report.md +++ b/plugins/scaffolder-backend-module-gitlab/api-report.md @@ -7,7 +7,7 @@ import { ScmIntegrationRegistry } from '@backstage/integration'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; // @public -export const createGitlabProjectAccessToken: (options: { +export const createGitlabProjectAccessTokenAction: (options: { integrations: ScmIntegrationRegistry; }) => TemplateAction<{ repoUrl: string; @@ -19,7 +19,7 @@ export const createGitlabProjectAccessToken: (options: { }>; // @public -export const createGitlabProjectDeployToken: (options: { +export const createGitlabProjectDeployTokenAction: (options: { integrations: ScmIntegrationRegistry; }) => TemplateAction<{ repoUrl: string; @@ -31,7 +31,7 @@ export const createGitlabProjectDeployToken: (options: { }>; // @public -export const createGitlabProjectVariable: (options: { +export const createGitlabProjectVariableAction: (options: { integrations: ScmIntegrationRegistry; }) => TemplateAction<{ repoUrl: string; diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/createProjectAccessToken.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectAccessTokenAction.ts similarity index 96% rename from plugins/scaffolder-backend-module-gitlab/src/actions/createProjectAccessToken.ts rename to plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectAccessTokenAction.ts index b4f7ee4f70..971bc2fa65 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/actions/createProjectAccessToken.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectAccessTokenAction.ts @@ -24,7 +24,7 @@ import { getToken } from '../util'; * @param options - Templating configuration. * @public */ -export const createGitlabProjectAccessToken = (options: { +export const createGitlabProjectAccessTokenAction = (options: { integrations: ScmIntegrationRegistry; }) => { const { integrations } = options; @@ -36,7 +36,7 @@ export const createGitlabProjectAccessToken = (options: { scopes: string[]; token?: string; }>({ - id: 'gitlab:create-project-access-token', + id: 'gitlab:pat:create', schema: { input: { required: ['projectId', 'repoUrl'], diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/createProjectDeployToken.test.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.test.ts similarity index 94% rename from plugins/scaffolder-backend-module-gitlab/src/actions/createProjectDeployToken.test.ts rename to plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.test.ts index 652e7123c8..1d3ae804c1 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/actions/createProjectDeployToken.test.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { createGitlabProjectDeployToken } from './createProjectDeployToken'; +import { createGitlabProjectDeployTokenAction } from './createGitlabProjectDeployTokenAction'; import { ScmIntegrations } from '@backstage/integration'; import { ConfigReader } from '@backstage/config'; import { getVoidLogger } from '@backstage/backend-common'; @@ -51,7 +51,7 @@ describe('gitlab:create-deploy-token', () => { }); const integrations = ScmIntegrations.fromConfig(config); - const action = createGitlabProjectDeployToken({ integrations }); + const action = createGitlabProjectDeployTokenAction({ integrations }); const mockContext = { input: { repoUrl: 'gitlab.com?repo=repo&owner=owner', diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/createProjectDeployToken.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.ts similarity index 96% rename from plugins/scaffolder-backend-module-gitlab/src/actions/createProjectDeployToken.ts rename to plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.ts index 08d789c68c..f8fc5bd389 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/actions/createProjectDeployToken.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.ts @@ -27,7 +27,7 @@ import { InputError } from '@backstage/errors'; * @param options - Templating configuration. * @public */ -export const createGitlabProjectDeployToken = (options: { +export const createGitlabProjectDeployTokenAction = (options: { integrations: ScmIntegrationRegistry; }) => { const { integrations } = options; @@ -39,7 +39,7 @@ export const createGitlabProjectDeployToken = (options: { scopes: string[]; token?: string; }>({ - id: 'gitlab:create-project-deploy-token', + id: 'gitlab:pdt:create', schema: { input: { required: ['projectId', 'repoUrl'], diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/createProjectVariable.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectVariableAction.ts similarity index 97% rename from plugins/scaffolder-backend-module-gitlab/src/actions/createProjectVariable.ts rename to plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectVariableAction.ts index 2587f4f740..5b974e6235 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/actions/createProjectVariable.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectVariableAction.ts @@ -25,7 +25,7 @@ import { Gitlab } from '@gitbeaker/node'; * @param options - Templating configuration. * @public */ -export const createGitlabProjectVariable = (options: { +export const createGitlabProjectVariableAction = (options: { integrations: ScmIntegrationRegistry; }) => { const { integrations } = options; @@ -41,7 +41,7 @@ export const createGitlabProjectVariable = (options: { environmentScope: string; token?: string; }>({ - id: 'gitlab:create-project-variable', + id: 'gitlab:pv:create', schema: { input: { required: [ diff --git a/plugins/scaffolder-backend-module-gitlab/src/index.ts b/plugins/scaffolder-backend-module-gitlab/src/index.ts index 4ca0b3bb7f..11209e19bd 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/index.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/index.ts @@ -19,6 +19,6 @@ * @packageDocumentation */ -export * from './actions/createProjectDeployToken'; -export * from './actions/createProjectAccessToken'; -export * from './actions/createProjectVariable'; +export * from './actions/createGitlabProjectDeployTokenAction'; +export * from './actions/createGitlabProjectAccessTokenAction'; +export * from './actions/createGitlabProjectVariableAction';