Skip to content

Commit

Permalink
fix(connector-builder-contribute): ensure files pass formating (#13380)
Browse files Browse the repository at this point in the history
### TL;DR
Ensure we pass airbyte-ci formatting

### What changed?
We do this by:
1. Quoting allowed hosts in metadata.yaml
2. Using double quotes for manifest yaml

### Example PR
airbytehq/airbyte#42937
  • Loading branch information
bnchrch committed Aug 1, 2024
1 parent e98dc2e commit 6976bf9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ data:
allowedHosts:
hosts:
{% for host in allowedHosts %}
- {{ host }}
- "{{ host }}"
{% endfor %}

registries:
oss:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ const MANIFEST_KEY_ORDER: Array<keyof ConnectorManifest> = [
export function convertJsonToYaml(json: ConnectorManifest): string {
const yamlString = dump(json, {
noRefs: true,
quotingType: '"',
sortKeys: (a: keyof ConnectorManifest, b: keyof ConnectorManifest) => {
const orderA = MANIFEST_KEY_ORDER.indexOf(a);
const orderB = MANIFEST_KEY_ORDER.indexOf(b);
Expand Down

0 comments on commit 6976bf9

Please sign in to comment.