fix: fixed some issues

Signed-off-by: Elaine Mattos <elaine.mattos@gmail.com>
This commit is contained in:
Elaine De-Mattos-Silva-Bezerra
2023-12-03 21:07:31 +01:00
committed by Elaine Mattos
parent d5ede226d6
commit 96b8bf417c
3 changed files with 86 additions and 11 deletions
@@ -164,8 +164,26 @@ spec:
repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }}
catalogInfoPath: '/catalog-info.yaml'
- id: gitlabIssue
name: Issues
action: gitlab:issues:create
input:
repoUrl: ${{ parameters.repoUrl }}
token: ${{ secrets.USER_OAUTH_TOKEN }}
projectId: 1111111
title: Test Issue
assignees:
- 2222222
description: This is the description of the issue
confidential: true
createdAt: 2022-09-27 18:00:00.000
dueDate: 2024-09-28 12:00:00.000
epicId: 3333333
labels: phase1:label1,phase2:label2
output:
links:
- title: Repository
url: ${{ steps['publish'].output.remoteUrl }}
- title: Link to new issue
url: ${{ steps['gitlabIssue'].output.issueUrl }}
```
@@ -0,0 +1,56 @@
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
- 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: 52723821
title: Test Issue
assignees:
- 11013327
description: This is the description of the issue
confidential: true
createdAt: 2022-09-27 18:00:00.000
dueDate: 2024-09-28 12:00:00.000
epicId: 1456
labels: test-label1,test-label2
output:
links:
- title: Link to new issue
url: ${{ steps['gitlabIssue'].output.issueUrl }}
@@ -21,8 +21,7 @@ import {
createTemplateAction,
} from '@backstage/plugin-scaffolder-node';
import * as yaml from 'yaml';
import {
commonGitlabConfig,
import commonGitlabConfig, {
commonGitlabConfigExample,
} from '../commonGitlabConfig';
import { z } from 'zod';
@@ -160,7 +159,7 @@ function getExamples(): TemplateExample[] {
action: 'gitlab:issues:create',
input: {
...commonGitlabConfigExample,
projectId: '12',
projectId: 12,
title: 'Test Issue',
description: 'This is the description of the issue',
},
@@ -178,9 +177,9 @@ function getExamples(): TemplateExample[] {
action: 'gitlab:issues:create',
input: {
...commonGitlabConfigExample,
projectId: '12',
projectId: 12,
title: 'Test Issue',
assignees: '18',
assignees: -18,
description: 'This is the description of the issue',
createdAt: '2022-09-27 18:00:00.000',
dueDate: '2022-09-28 12:00:00.000',
@@ -196,19 +195,21 @@ function getExamples(): TemplateExample[] {
{
id: 'gitlabIssue',
name: 'Issues',
action: 'dxc:gitlab:issues:create',
action: 'gitlab:issues:create',
input: {
...commonGitlabConfigExample,
projectId: '12',
projectId: 12,
title: 'Test Issue',
assignees: '18',
assignees: `
- 18
- 15 `,
description: 'This is the description of the issue',
confidential: false,
createdAt: '2022-09-27 18:00:00.000',
dueDate: '2022-09-28 12:00:00.000',
discussionToResolve: '1',
epicId: '1',
labels: 'test-label1,test-label2',
discussionToResolve: 1,
epicId: 1,
labels: 'phase1:label1,phase2:label2',
},
},
],