Skip to content

Commit

Permalink
Checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
manchicken committed Aug 4, 2024
1 parent c2c36d1 commit 04ff56f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
14 changes: 14 additions & 0 deletions __tests__/data/component-mappings-complete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- name: PHP Web App
kind: service
repo: https://github.com/fake+org/php-web-app
languages: |
- php
- sql
- javascript
tags: |
- internet_accessible:true
- name: MySQL Database
kind: datastore
repo: https://github.com/fake+org/database-ddl
slack-support-channel: 'https://fakeorg.slack.com/archives/A0000000008'
languages: sql
5 changes: 5 additions & 0 deletions __tests__/lib/component-mappings.test.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const YAML = require('yaml')
const core = require('@actions/core')
const subject = require('../../lib/component-mappings.cjs')

describe('imports', () => {
Expand All @@ -17,7 +19,10 @@ describe('imports', () => {
describe('component metadata', () => {
// Let's test the entity types
test('#mapComponentMetadata()', () => {
// Empty works
expect(subject._test.mapComponentMetadata())

const
})
})

Expand Down
4 changes: 3 additions & 1 deletion lib/component-mappings.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ const mapComponentMetadata = (core, componentObject = {}) => {
id: componentObject?.id,
inheritFrom: componentObject?.inheritFrom,
owner: { name: componentObject?.owner ?? componentObject?.team },
additionalOwners: component?.additionalOwners?.map((x) => ({ name: x })),
additionalOwners: componentObject?.additionalOwners?.map((x) => ({
name: x,
})),
name: componentObject?.name,
namespace: componentObject?.namespace,
description: componentObject?.description,
Expand Down

0 comments on commit 04ff56f

Please sign in to comment.