Skip to content

Commit

Permalink
Minor tweaks preparing to merge
Browse files Browse the repository at this point in the history
  • Loading branch information
svanharmelen committed Oct 15, 2023
1 parent 7b65344 commit 5553955
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
32 changes: 16 additions & 16 deletions resource_iteration_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ type ResourceIterationEventsService struct {
//
// GitLab API docs: https://docs.gitlab.com/ee/api/resource_iteration_events.html
type IterationEvent struct {
ID int `json:"id"`
Action string `json:"action"`
CreatedAt *time.Time `json:"created_at"`
ResourceType string `json:"resource_type"`
ResourceID int `json:"resource_id"`
User *BasicUser `json:"user"`
Iteration *ProjectIssueIteration `json:"iteration"`
ID int `json:"id"`
User *BasicUser `json:"user"`
CreatedAt *time.Time `json:"created_at"`
ResourceType string `json:"resource_type"`
ResourceID int `json:"resource_id"`
Iteration *Iteration `json:"iteration"`
Action string `json:"action"`
}

// ProjectIssueIteration represents a project issue iteration.
// Iteration represents a project issue iteration.
//
// GitLab API docs: https://docs.gitlab.com/ee/api/resource_iteration_events.html
type ProjectIssueIteration struct {
Id int `json:"id"`
Iid int `json:"iid"`
type Iteration struct {
ID int `json:"id"`
IID int `json:"iid"`
Sequence int `json:"sequence"`
GroupId int `json:"group_id"`
Title string `json:"title"`
Expand All @@ -58,20 +58,20 @@ type ProjectIssueIteration struct {
UpdatedAt *time.Time `json:"updated_at"`
DueDate *ISOTime `json:"due_date"`
StartDate *ISOTime `json:"start_date"`
WebUrl string `json:"web_url"`
WebURL string `json:"web_url"`
}

// ListIterationEventsOptions represents the options for all resource state events
// list methods.
// ListIterationEventsOptions represents the options for all resource state
// events list methods.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/resource_iteration_events.html#list-project-issue-iteration-events
type ListIterationEventsOptions struct {
ListOptions
}

// ListIssueIterationEvents retrieves resource iteration events for the specified
// project and issue.
// ListIssueIterationEvents retrieves resource iteration events for the
// specified project and issue.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/resource_iteration_events.html#list-project-issue-iteration-events
Expand Down
28 changes: 14 additions & 14 deletions resource_iteration_events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,20 @@ func TestListIssueIterationEventsService_ListIssueIterationEvents(t *testing.T)
},
ResourceType: "Issue",
ResourceID: 11,
CreatedAt: Time(time.Date(2023, time.September, 22, 06, 51, 04, 801000000, time.UTC)),
Iteration: &ProjectIssueIteration{
Id: 133,
Iid: 1,
CreatedAt: Time(time.Date(2023, time.September, 22, 0o6, 51, 0o4, 801000000, time.UTC)),
Iteration: &Iteration{
ID: 133,
IID: 1,
Sequence: 1,
GroupId: 153,
Title: "Iteration 1",
Description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
State: 1,
CreatedAt: Time(time.Date(2023, time.July, 15, 00, 05, 06, 509000000, time.UTC)),
UpdatedAt: Time(time.Date(2023, time.September, 24, 00, 05, 10, 476000000, time.UTC)),
CreatedAt: Time(time.Date(2023, time.July, 15, 0o0, 0o5, 0o6, 509000000, time.UTC)),
UpdatedAt: Time(time.Date(2023, time.September, 24, 0o0, 0o5, 10, 476000000, time.UTC)),
StartDate: &startDateISOTime,
DueDate: &dueDateISOTime,
WebUrl: "https://gitlab.example.com/groups/project/-/iterations/1",
WebURL: "https://gitlab.example.com/groups/project/-/iterations/1",
},
Action: "add",
}}
Expand Down Expand Up @@ -162,20 +162,20 @@ func TestListIssueIterationEventsService_GetIssueIterationEvent(t *testing.T) {
},
ResourceType: "Issue",
ResourceID: 11,
CreatedAt: Time(time.Date(2023, time.September, 22, 06, 51, 04, 801000000, time.UTC)),
Iteration: &ProjectIssueIteration{
Id: 133,
Iid: 1,
CreatedAt: Time(time.Date(2023, time.September, 22, 0o6, 51, 0o4, 801000000, time.UTC)),
Iteration: &Iteration{
ID: 133,
IID: 1,
Sequence: 1,
GroupId: 153,
Title: "Iteration 1",
Description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
State: 1,
CreatedAt: Time(time.Date(2023, time.July, 15, 00, 05, 06, 509000000, time.UTC)),
UpdatedAt: Time(time.Date(2023, time.September, 24, 00, 05, 10, 476000000, time.UTC)),
CreatedAt: Time(time.Date(2023, time.July, 15, 0o0, 0o5, 0o6, 509000000, time.UTC)),
UpdatedAt: Time(time.Date(2023, time.September, 24, 0o0, 0o5, 10, 476000000, time.UTC)),
StartDate: &startDateISOTime,
DueDate: &dueDateISOTime,
WebUrl: "https://gitlab.example.com/groups/project/-/iterations/2",
WebURL: "https://gitlab.example.com/groups/project/-/iterations/2",
},
Action: "add",
}
Expand Down

0 comments on commit 5553955

Please sign in to comment.