diff options
| author | mo khan <mo@mokhan.ca> | 2024-05-18 13:19:57 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2024-05-18 13:19:57 -0600 |
| commit | bc2a7aa283a9afc5b25b7c5d25e2472605b60572 (patch) | |
| tree | 048c725208f06636be7f25a711b437479525ec50 | |
| parent | 7df27d0d0afd5068efedc4cf72c0a7b365af02f8 (diff) | |
feat: parse closed_at field
| -rw-r--r-- | pkg/gitlab/issue.go | 1 | ||||
| -rw-r--r-- | pkg/gitlab/issue_test.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/pkg/gitlab/issue.go b/pkg/gitlab/issue.go index 7db9a05..2469978 100644 --- a/pkg/gitlab/issue.go +++ b/pkg/gitlab/issue.go @@ -22,6 +22,7 @@ type Issue struct { State IssueState `json:"state"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` + ClosedAt time.Time `json:"closed_at"` } func FromIssues(r io.Reader) ([]Issue, error) { diff --git a/pkg/gitlab/issue_test.go b/pkg/gitlab/issue_test.go index 6ecc526..2889359 100644 --- a/pkg/gitlab/issue_test.go +++ b/pkg/gitlab/issue_test.go @@ -47,6 +47,7 @@ func TestIssue(t *testing.T) { assert.Equal(t, StateClosed, result.State) assert.Equal(t, x.Must(time.Parse(time.RFC3339Nano, "2024-05-18T17:39:14.548Z")), result.CreatedAt) assert.Equal(t, x.Must(time.Parse(time.RFC3339Nano, "2024-05-18T18:14:37.830Z")), result.UpdatedAt) + assert.Equal(t, x.Must(time.Parse(time.RFC3339Nano, "2024-05-18T17:39:16.837Z")), result.ClosedAt) }) }) } |
