Skip to content

Commit

Permalink
fix(api): add ref to dashboard build partial (#1161)
Browse files Browse the repository at this point in the history
* fix(api): add ref to dashboard build partial

* fix(api): add ref to dashboard mock

---------

Co-authored-by: Tim Huynh <[email protected]>
  • Loading branch information
KellyMerrick and timhuynh94 authored Jul 18, 2024
1 parent 75a9ee6 commit bde655a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/dashboard/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func buildRepoPartials(c context.Context, repos []*types.DashboardRepo) ([]types
Status: build.GetStatus(),
Started: build.GetStarted(),
Finished: build.GetFinished(),
Ref: build.GetRef(),
Sender: build.GetSender(),
Branch: build.GetBranch(),
Event: build.GetEvent(),
Expand Down
1 change: 1 addition & 0 deletions api/types/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type BuildPartial struct {
Started int64 `json:"started,omitempty"`
Finished int64 `json:"finished,omitempty"`
Sender string `json:"sender,omitempty"`
Ref string `json:"ref,omitempty"`
Status string `json:"status,omitempty"`
Event string `json:"event,omitempty"`
Branch string `json:"branch,omitempty"`
Expand Down
3 changes: 3 additions & 0 deletions mock/server/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const (
"number": 1,
"started": 1714678666,
"finished": 1714678672,
"ref": "refs/heads/main",
"sender": "Octocat",
"status": "failure",
"event": "deployment",
Expand Down Expand Up @@ -134,6 +135,7 @@ const (
"number": 1,
"started": 1714678666,
"finished": 1714678672,
"ref": "refs/heads/main",
"sender": "Octocat",
"status": "failure",
"event": "deployment",
Expand Down Expand Up @@ -184,6 +186,7 @@ const (
"number": 1,
"started": 1714678666,
"finished": 1714678672,
"ref": "refs/heads/main",
"sender": "Octocat",
"status": "failure",
"event": "deployment",
Expand Down

0 comments on commit bde655a

Please sign in to comment.