Skip to content

Commit

Permalink
fix compile and test errors for listing MRs
Browse files Browse the repository at this point in the history
  • Loading branch information
Leah Chung committed Jul 12, 2018
1 parent 62e3277 commit e197188
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cmd/mr_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var listCmd = &cobra.Command{
mrs, err := lab.MRList(rn, &gitlab.ListProjectMergeRequestsOptions{
ListOptions: gitlab.ListOptions{
Page: int(page),
PerPage: &mrPerPage,
PerPage: mrPerPage,
},
Labels: mrLabels,
State: &mrState,
Expand All @@ -50,8 +50,8 @@ func init() {
listCmd.Flags().StringVarP(
&mrState, "state", "s", "opened",
"filter merge requests by state (opened/closed/merged)")
listCmd.Flags().StringVarP(
&mrState, "perPage", "n", 10,
listCmd.Flags().IntVarP(
&mrPerPage, "per-page", "n", 10,
"preset number of returned merge requests")
mrCmd.AddCommand(listCmd)
}
4 changes: 2 additions & 2 deletions cmd/mr_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func Test_mrListFlagLabel(t *testing.T) {

mrs := strings.Split(string(b), "\n")
t.Log(mrs)
require.Equal(t, "#3 Test filtering by label", mrs[0])
require.Equal(t, "#3 for testings filtering with labels and lists", mrs[0])
}

func Test_mrListStateMerged(t *testing.T) {
Expand Down Expand Up @@ -85,5 +85,5 @@ func Test_mrListFivePerPage(t *testing.T) {

mrs := strings.Split(string(b), "\n")
t.Log(mrs)
require.Equal(t, "#6 with per page preset", mrs[0])
require.Equal(t, "#1 Test MR for lab list", mrs[0])
}

0 comments on commit e197188

Please sign in to comment.