feat: remove unused code
Signed-off-by: Elaine Mattos <elaine.mattos@gmail.com>
This commit is contained in:
committed by
Elaine Mattos
parent
40dcabc994
commit
99b109849d
@@ -23,13 +23,6 @@ import { Router } from 'express';
|
||||
import type { PluginEnvironment } from '../types';
|
||||
import { ScmIntegrations } from '@backstage/integration';
|
||||
import { createConfluenceToMarkdownAction } from '@backstage/plugin-scaffolder-backend-module-confluence-to-markdown';
|
||||
import {
|
||||
createGitlabProjectAccessTokenAction,
|
||||
createGitlabProjectDeployTokenAction,
|
||||
createGitlabProjectVariableAction,
|
||||
createGitlabGroupEnsureExistsAction,
|
||||
createGitlabIssueAction,
|
||||
} from '@backstage/plugin-scaffolder-backend-module-gitlab';
|
||||
|
||||
export default async function createPlugin(
|
||||
env: PluginEnvironment,
|
||||
@@ -54,11 +47,6 @@ export default async function createPlugin(
|
||||
config: env.config,
|
||||
reader: env.reader,
|
||||
}),
|
||||
createGitlabProjectAccessTokenAction({ integrations: integrations }),
|
||||
createGitlabProjectDeployTokenAction({ integrations: integrations }),
|
||||
createGitlabProjectVariableAction({ integrations: integrations }),
|
||||
createGitlabGroupEnsureExistsAction({ integrations: integrations }),
|
||||
createGitlabIssueAction({ integrations: integrations }),
|
||||
];
|
||||
|
||||
return await createRouter({
|
||||
|
||||
@@ -55,8 +55,6 @@ return await createRouter({
|
||||
database: env.database,
|
||||
reader: env.reader,
|
||||
});
|
||||
|
||||
// TODO: incorporate Issues creation in example
|
||||
```
|
||||
|
||||
After that you can use the action in your template:
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
apiVersion: scaffolder.backstage.io/v1beta3
|
||||
kind: Template
|
||||
metadata:
|
||||
name: gitlab-demo
|
||||
title: Gitlab DEMO
|
||||
description: Scaffolder Gitlab Demo
|
||||
spec:
|
||||
owner: backstage/techdocs-core
|
||||
type: service
|
||||
|
||||
parameters:
|
||||
- title: Fill in some steps
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
title: Name
|
||||
type: string
|
||||
description: Unique name of the component
|
||||
ui:autofocus: true
|
||||
ui:options:
|
||||
rows: 5
|
||||
projectId:
|
||||
title: Project id
|
||||
type: number
|
||||
weight:
|
||||
title: Issue weight
|
||||
type: number
|
||||
title:
|
||||
title: Issue title
|
||||
type: string
|
||||
description:
|
||||
title: Issue description
|
||||
type: string
|
||||
issueType:
|
||||
title: Type
|
||||
type: string
|
||||
ui:help: 'issue, incident, test_case'
|
||||
createdAt:
|
||||
title: Creation date
|
||||
type: string
|
||||
format: date-time
|
||||
dueDate:
|
||||
title: Due date
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
- title: Choose a location
|
||||
required:
|
||||
- repoUrl
|
||||
properties:
|
||||
repoUrl:
|
||||
title: Repository Location
|
||||
type: string
|
||||
ui:field: RepoUrlPicker
|
||||
ui:options:
|
||||
allowedHosts:
|
||||
- gitlab.com
|
||||
|
||||
steps:
|
||||
- id: gitlabIssue
|
||||
name: Issues
|
||||
action: gitlab:issues:create
|
||||
input:
|
||||
repoUrl: ${{ parameters.repoUrl }} # git.tech.rz.db.de?owner=devex-core&repo=test-repo
|
||||
token: ${{ secrets.USER_OAUTH_TOKEN }}
|
||||
projectId: ${{ parameters.projectId }} # 52723821
|
||||
title: ${{ parameters.title }}
|
||||
weight: ${{ parameters.weight }}
|
||||
assignees:
|
||||
- 11013327
|
||||
description: ${{ parameters.description }}
|
||||
confidential: true
|
||||
createdAt: ${{ parameters.createdAt }} # "2023-03-11T03:45:40Z"
|
||||
dueDate: ${{ parameters.dueDate }} # "2024-03-11T03:45:40Z"
|
||||
labels: test-label1,test-label2
|
||||
issueType: ${{ parameters.issueType }}
|
||||
output:
|
||||
links:
|
||||
- title: Link to new issue
|
||||
url: ${{ steps['gitlabIssue'].output.issueUrl }}
|
||||
|
||||
-2
@@ -60,8 +60,6 @@ export const createGitlabGroupEnsureExistsAction = (options: {
|
||||
|
||||
const { path } = ctx.input;
|
||||
const { token, integrationConfig } = getToken(ctx.input, integrations);
|
||||
console.log(`THIS IS THE TOKEN ${token}`);
|
||||
console.log(`THIS IS THE PATH ${path}`);
|
||||
const api = new Gitlab({
|
||||
host: integrationConfig.config.baseUrl,
|
||||
token: token,
|
||||
|
||||
Reference in New Issue
Block a user