Skip to content

Commit

Permalink
use generic interface for DifferentialDiff.Properties to avoid unmars…
Browse files Browse the repository at this point in the history
…hal array error (#37)
  • Loading branch information
raynor85 authored Feb 6, 2024
1 parent ac84f09 commit ec62009
Showing 1 changed file with 17 additions and 29 deletions.
46 changes: 17 additions & 29 deletions entities/differential.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ type DifferentialRevision struct {

// A DifferentialDiff represents a diff in Differential.
type DifferentialDiff struct {
ID string `json:"id"`
RevisionID string `json:"revisionID"`
DateCreated util.UnixTimestamp `json:"dateCreated"`
DateModified util.UnixTimestamp `json:"dateModified"`
SourceControlBaseRevision string `json:"sourceControlBaseRevision"`
SourceControlPath string `json:"sourceControlPath"`
SourceControlSystem string `json:"sourceControlSystem"`
Branch string `json:"branch"`
Bookmark string `json:"bookmark"`
CreationMethod string `json:"creationMethod"`
Description string `json:"description"`
UnitStatus string `json:"unitStatus"`
LintStatus string `json:"lintStatus"`
Changes []DifferentialChange `json:"changes"`
Properties DifferentialProperties `json:"properties"`
AuthorName string `json:"authorName"`
AuthorEmail string `json:"authorEmail"`
ID string `json:"id"`
RevisionID string `json:"revisionID"`
DateCreated util.UnixTimestamp `json:"dateCreated"`
DateModified util.UnixTimestamp `json:"dateModified"`
SourceControlBaseRevision string `json:"sourceControlBaseRevision"`
SourceControlPath string `json:"sourceControlPath"`
SourceControlSystem string `json:"sourceControlSystem"`
Branch string `json:"branch"`
Bookmark string `json:"bookmark"`
CreationMethod string `json:"creationMethod"`
Description string `json:"description"`
UnitStatus string `json:"unitStatus"`
LintStatus string `json:"lintStatus"`
Changes []DifferentialChange `json:"changes"`
Properties interface{} `json:"properties"`
AuthorName string `json:"authorName"`
AuthorEmail string `json:"authorEmail"`
}

// A DifferentialChange represents a change to a file in Differential.
Expand All @@ -70,18 +70,6 @@ type DifferentialHunk struct {
Corpus string `json:"corpus"`
}

// A DifferentialProperties contains dynamic metadata about the Diff.
type DifferentialProperties struct {
ArcOnto []DifferentialArcOnto `json:"arc:onto"`
}

// A DifferentialArcOnto contains a list of branch destinations set with arc.
type DifferentialArcOnto struct {
Type string `json:"type"`
Name string `json:"name"`
Kind string `json:"kind"`
}

// A DifferentialRawDiff is a raw diff.
type DifferentialRawDiff struct {
Diff string `json:"diff"`
Expand Down

0 comments on commit ec62009

Please sign in to comment.