Skip to content

Commit

Permalink
git: fix reference json serialization
Browse files Browse the repository at this point in the history
- add omitempty to GitRepositoryRef fields
  • Loading branch information
stefanprodan committed Apr 29, 2020
1 parent f2bff90 commit 53a11f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/v1alpha1/gitrepository_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,20 @@ type GitRepositorySpec struct {
type GitRepositoryRef struct {
// The git branch to checkout, defaults to master.
// +optional
Branch string `json:"branch"`
Branch string `json:"branch,omitempty"`

// The git tag to checkout, takes precedence over branch.
// +optional
Tag string `json:"tag"`
Tag string `json:"tag,omitempty"`

// The git tag semver expression, takes precedence over tag.
// +optional
SemVer string `json:"semver"`
SemVer string `json:"semver,omitempty"`

// The git commit sha to checkout, if specified tag filters will be
// ignored.
// +optional
Commit string `json:"commit"`
Commit string `json:"commit,omitempty"`
}

// GitRepositoryVerification defines the OpenPGP signature verification process.
Expand Down

0 comments on commit 53a11f7

Please sign in to comment.