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

[MM-23184] Omit empty labels list #48

Merged
merged 3 commits into from
Mar 19, 2020
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
2 changes: 1 addition & 1 deletion internal/model/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Plugin struct {
IconData string `json:"icon_data"` // The base64 encoding of an svg image
DownloadURL string `json:"download_url"`
ReleaseNotesURL string `json:"release_notes_url"`
Labels []Label `json:"labels"`
Labels []Label `json:"labels,omitempty"`
Signature string `json:"signature"` // A signature of a plugin saved in base64 encoding.
Manifest *mattermostModel.Manifest `json:"manifest"`
UpdatedAt time.Time `json:"updated_at"` // The point in time this release of the plugin was added to the Plugin Marketplace
Expand Down
2 changes: 0 additions & 2 deletions internal/model/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ func TestPluginsToWriter(t *testing.T) {
"icon_data": "icon-data.svg",
"download_url": "https://github.com/mattermost/mattermost-plugin-demo/releases/download/v0.1.0/com.mattermost.demo-plugin-0.1.0.tar.gz",
"release_notes_url": "https://github.com/mattermost/mattermost-plugin-demo/releases/v0.1.0",
"labels": null,
"signature": "signature1",
"manifest": {
"id": "demo",
Expand All @@ -150,7 +149,6 @@ func TestPluginsToWriter(t *testing.T) {
"icon_data": "icon-data2.svg",
"download_url": "https://github.com/mattermost/mattermost-plugin-starter-template/releases/download/v0.1.0/com.mattermost.plugin-starter-template-0.1.0.tar.gz",
"release_notes_url": "https://github.com/mattermost/mattermost-plugin-starter-template/releases/v0.1.0",
"labels": null,
"signature": "signature2",
"manifest": {
"id": "template",
Expand Down