Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modular mappers #94

Merged
merged 5 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/v2-automated-testing.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: DataDog Service Catalog
name: DataDog Service Catalog v2
on:
push:
workflow_dispatch:
Expand Down Expand Up @@ -57,19 +57,16 @@ jobs:
links: |
- url: https://github.com/actions/toolkit
type: repo
provider: Github
name: '@actions/toolkit'
- name: AMI Version Status Dashboard
url: https://thisisanentirelyfakeurl.seriouslythisisafakehostname.com/dashboard
type: dashboard
- name: GitHub Actions!
url: https://github.com/features/actions
provider: Github Docs
type: doc
- name: Some Runbook
url: https://thisisanentirelyfakeurl.seriouslythisisafakehostname.com/runbook
type: runbook
provider: Confluence
docs: |
- name: Some Docs
url: https://thisisanentirelyfakeurl.seriouslythisisafakehostname.com/docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/v2.1-automated-testing.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: DataDog Service Catalog
name: DataDog Service Catalog v2.1
on:
push:
workflow_dispatch:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/v2.2-automated-testing.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: DataDog Service Catalog
name: DataDog Service Catalog v2.2
on:
push:
workflow_dispatch:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- language:nodejs
- updated:${{ steps.date.outputs.date }}
- internet_accessible: false
- schema-version: 2.2
- schema-version: v2.2
links: |
- url: https://github.com/actions/toolkit
type: repo
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog],
and this project adheres to [Semantic Versioning].

## [3.0.0] - unreleased

> [!WARNING]
> This version may include breaking changes!
> There have been efforts made to not break backwards compatibility for either the org rules file
> or the schema versions. That said, it is impossible to know how you have structured your files,
> so please exercise caution when upgrading to the `v3` tag.

### Added

- Better tests for the various schema versions

### Changed

- Moved all of the field mapping from a common module for all versions, to version-specific modules
- This will make it easier to add new schema version support without risking breakage to existing versions
- This makes it much easier to test convenience functionality independently from the schema fields
- So... many... tests...

## [2.3.0] - 2024-02-07

### Added
Expand Down
18 changes: 18 additions & 0 deletions __tests__/lib/__snapshots__/convenienceMappings.test.cjs.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`lib/convenienceMappings.cjs #getConvenienceFieldValues() - full set 1`] = `
{
"email": "team-name-here@fakeemaildomainthatdoesntexist.com",
"repo": "https://github.com/arcxp/datadog-service-catalog-metadata-provider",
"slack": "https://fakeorg.slack.com/archives/A0000000000",
"slack-support-channel": "https://fakeorg.slack.com/archives/A0000000001",
}
`;

exports[`lib/convenienceMappings.cjs #getConvenienceFieldValues() - partial set 1`] = `
{
"repo": "https://github.com/arcxp/datadog-service-catalog-metadata-provider",
"slack": "https://fakeorg.slack.com/archives/A0000000000",
"slack-support-channel": "https://fakeorg.slack.com/archives/A0000000001",
}
`;
124 changes: 0 additions & 124 deletions __tests__/lib/__snapshots__/fieldMappings-schema.test.cjs.snap

This file was deleted.

124 changes: 0 additions & 124 deletions __tests__/lib/__snapshots__/fieldMappings.test.cjs.snap

This file was deleted.

Loading
Loading