From 331e3dd31fa8c1e4e6b3d99d2ee6c9b150748dca Mon Sep 17 00:00:00 2001 From: Jeisson Osorio Date: Mon, 23 Oct 2023 14:14:41 -0500 Subject: [PATCH] chore: fix alignment for dd-service catalog message --- src/datadog-service-catalog.ts | 14 ++-- test/__snapshots__/clickup-cdk.test.ts.snap | 64 +++++++++---------- .../datadog-service-catalog.test.ts.snap | 56 ++++++++-------- 3 files changed, 67 insertions(+), 67 deletions(-) diff --git a/src/datadog-service-catalog.ts b/src/datadog-service-catalog.ts index 643fe8c4..0280cb93 100644 --- a/src/datadog-service-catalog.ts +++ b/src/datadog-service-catalog.ts @@ -164,21 +164,21 @@ export module datadogServiceCatalog { const contacts = `${options.contacts?.map( (contact) => ` -- type: ${contact.type} - contact: ${contact.contact} - name: ${contact.name}`, + - type: ${contact.type} + contact: ${contact.contact} + name: ${contact.name}`, )}`; const links = `${options.links?.map( (link) => ` -- type: ${link.type} - url: ${link.url} - name: ${link.name}`, + - type: ${link.type} + url: ${link.url} + name: ${link.name}`, )}`; const tags = `${Object.keys(serviceTags).map( (key) => ` -- ${key}:${serviceTags[key]}`, + - ${key}:${serviceTags[key]}`, )}`; const step: JobStep = { diff --git a/test/__snapshots__/clickup-cdk.test.ts.snap b/test/__snapshots__/clickup-cdk.test.ts.snap index 755f20a8..5b359d72 100644 --- a/test/__snapshots__/clickup-cdk.test.ts.snap +++ b/test/__snapshots__/clickup-cdk.test.ts.snap @@ -1405,12 +1405,12 @@ jobs: slack-support-channel: https://click-up.slack.com/archives/C043T0JBJKY contacts: undefined links: undefined - tags: |- + tags: |2- - - project:test, - - release:true, - - version:\${{ steps.event_metadata.outputs.release_tag }}, - - actor:\${{ github.actor }} + - project:test, + - release:true, + - version:\${{ steps.event_metadata.outputs.release_tag }}, + - actor:\${{ github.actor }} " `; @@ -1585,18 +1585,18 @@ jobs: team: testing pagerdutyUrl: https://test.pagerduty.com slack-support-channel: https://click-up.slack.com/archives/C043T0JBJKY - contacts: |- + contacts: |2- - - type: email - contact: contacttest@clickup.com - name: contact test + - type: email + contact: contacttest@clickup.com + name: contact test links: undefined - tags: |- + tags: |2- - - project:test, - - release:true, - - version:\${{ steps.event_metadata.outputs.release_tag }}, - - actor:\${{ github.actor }} + - project:test, + - release:true, + - version:\${{ steps.event_metadata.outputs.release_tag }}, + - actor:\${{ github.actor }} " `; @@ -1771,22 +1771,22 @@ jobs: team: testing pagerdutyUrl: https://test.pagerduty.com slack-support-channel: https://click-up.slack.com/archives/C043T0JBJKY - contacts: |- + contacts: |2- - - type: email - contact: contacttest@clickup.com - name: contact test - links: |- + - type: email + contact: contacttest@clickup.com + name: contact test + links: |2- - - type: other - url: https://test.clickup.com - name: link test - tags: |- + - type: other + url: https://test.clickup.com + name: link test + tags: |2- - - project:test, - - release:true, - - version:\${{ steps.event_metadata.outputs.release_tag }}, - - actor:\${{ github.actor }} + - project:test, + - release:true, + - version:\${{ steps.event_metadata.outputs.release_tag }}, + - actor:\${{ github.actor }} " `; @@ -1963,12 +1963,12 @@ jobs: slack-support-channel: https://click-up.slack.com/archives/C043T0JBJKY contacts: undefined links: undefined - tags: |- + tags: |2- - - project:test, - - release:true, - - version:\${{ steps.event_metadata.outputs.release_tag }}, - - actor:\${{ github.actor }} + - project:test, + - release:true, + - version:\${{ steps.event_metadata.outputs.release_tag }}, + - actor:\${{ github.actor }} " `; diff --git a/test/__snapshots__/datadog-service-catalog.test.ts.snap b/test/__snapshots__/datadog-service-catalog.test.ts.snap index 6bbc893a..58b0efff 100644 --- a/test/__snapshots__/datadog-service-catalog.test.ts.snap +++ b/test/__snapshots__/datadog-service-catalog.test.ts.snap @@ -100,27 +100,27 @@ jobs: team: Not Provided pagerdutyUrl: https://test.pagerduty.com slack-support-channel: https://click-up.slack.com/archives/C043T0JBJKY - contacts: |- + contacts: |2- - - type: email - contact: contacttest@clickup.com - name: contact test - links: |- + - type: email + contact: contacttest@clickup.com + name: contact test + links: |2- - - type: other - url: https://test.clickup.com - name: link test, - - type: other - url: https://staging.clickup.com - name: staging link test - tags: |- + - type: other + url: https://test.clickup.com + name: link test, + - type: other + url: https://staging.clickup.com + name: staging link test + tags: |2- - - project:test-cdk, - - release:true, - - version:\${{ steps.event_metadata.outputs.release_tag }}, - - actor:\${{ github.actor }}, - - tag1:tag1-test, - - tag2:tag2-test + - project:test-cdk, + - release:true, + - version:\${{ steps.event_metadata.outputs.release_tag }}, + - actor:\${{ github.actor }}, + - tag1:tag1-test, + - tag2:tag2-test " `; @@ -226,12 +226,12 @@ jobs: slack-support-channel: https://click-up.slack.com/archives/C043T0JBJKY contacts: undefined links: undefined - tags: |- + tags: |2- - - project:test-cdk, - - release:true, - - version:\${{ steps.event_metadata.outputs.release_tag }}, - - actor:\${{ github.actor }} + - project:test-cdk, + - release:true, + - version:\${{ steps.event_metadata.outputs.release_tag }}, + - actor:\${{ github.actor }} - name: Publish DD Service Catalog for test-cdk uses: arcxp/datadog-service-catalog-metadata-provider@v2 with: @@ -249,11 +249,11 @@ jobs: slack-support-channel: https://click-up.slack.com/archives/C043T0JBJKY contacts: undefined links: undefined - tags: |- + tags: |2- - - project:test-cdk, - - release:true, - - version:\${{ steps.event_metadata.outputs.release_tag }}, - - actor:\${{ github.actor }} + - project:test-cdk, + - release:true, + - version:\${{ steps.event_metadata.outputs.release_tag }}, + - actor:\${{ github.actor }} " `;