Skip to content

Commit

Permalink
DifferentialQuery api returns an error when there are no Reviewers in…
Browse files Browse the repository at this point in the history
… the response (#39)
  • Loading branch information
raynor85 authored Feb 13, 2024
1 parent d58a851 commit da768df
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions entities/differential.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,24 @@ import (

// DifferentialRevision represents a revision in Differential.
type DifferentialRevision struct {
ID string `json:"id"`
PHID string `json:"phid"`
Title string `json:"title"`
URI string `json:"uri"`
DateCreated util.UnixTimestamp `json:"dateCreated"`
DateModified util.UnixTimestamp `json:"dateModified"`
AuthorPHID string `json:"authorPHID"`
Status string `json:"status"`
StatusName string `json:"statusName"`
Branch string `json:"branch"`
Summary string `json:"summary"`
TestPlan string `json:"testPlan"`
LineCount string `json:"lineCount"`
ActiveDiffPHID string `json:"activeDiffPHID"`
Diffs []string `json:"diffs"`
Commits []string `json:"commits"`
Reviewers map[string]string `json:"reviewers"`
ID string `json:"id"`
PHID string `json:"phid"`
Title string `json:"title"`
URI string `json:"uri"`
DateCreated util.UnixTimestamp `json:"dateCreated"`
DateModified util.UnixTimestamp `json:"dateModified"`
AuthorPHID string `json:"authorPHID"`
Status string `json:"status"`
StatusName string `json:"statusName"`
Branch string `json:"branch"`
Summary string `json:"summary"`
TestPlan string `json:"testPlan"`
LineCount string `json:"lineCount"`
ActiveDiffPHID string `json:"activeDiffPHID"`
Diffs []string `json:"diffs"`
Commits []string `json:"commits"`
// Reviewers is either of type map[string]string when populated, or []string when empty
Reviewers json.RawMessage `json:"reviewers"`
CCs []string `json:"ccs"`
Hashes [][]string `json:"hashes"`
Auxiliary map[string]interface{} `json:"auxiliary"`
Expand All @@ -47,9 +48,10 @@ type DifferentialDiff struct {
UnitStatus string `json:"unitStatus"`
LintStatus string `json:"lintStatus"`
Changes []DifferentialChange `json:"changes"`
Properties json.RawMessage `json:"properties"`
AuthorName string `json:"authorName"`
AuthorEmail string `json:"authorEmail"`
// Properties is either of type *DifferentialProperties when populated, or []string when empty
Properties json.RawMessage `json:"properties"`
AuthorName string `json:"authorName"`
AuthorEmail string `json:"authorEmail"`
}

// A DifferentialChange represents a change to a file in Differential.
Expand Down

0 comments on commit da768df

Please sign in to comment.