Skip to content

Commit 4ea14ab

Browse files
[triage] Omit the product if empty
The wpt-metadata repository expects that the product field will be omitted if empty, not written as an empty string (the current behavior). Fix this by marking it omitempty.
1 parent 7b1b528 commit 4ea14ab

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

shared/metadata.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type MetadataLinks []MetadataLink
3434
// META.yml file, which lists an external reference, optionally
3535
// filtered by product and a specific test.
3636
type MetadataLink struct {
37-
Product ProductSpec `yaml:"product" json:"product,omitempty"`
37+
Product ProductSpec `yaml:"product,omitempty" json:"product,omitempty"`
3838
URL string `yaml:"url" json:"url"`
3939
Results []MetadataTestResult `yaml:"results" json:"results,omitempty"`
4040
}

shared/metadata_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ links:
2828
subtest: Something should happen
2929
status: FAIL
3030
- test: c.html
31+
- url: https://github-issue.com/1234
32+
results:
33+
- test: d.html
3134
`)
3235
yaml.Unmarshal(metadataInBytes, &metadata)
3336
acutalInBytes, _ := yaml.Marshal(metadata)

0 commit comments

Comments
 (0)