Skip to content

Commit

Permalink
Fix SourceBranch missing by updating go-gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinDelille committed Sep 26, 2018
1 parent 0c5f7c4 commit fc4ca81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion cmd/mr_browse.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,18 @@ var mrBrowseCmd = &cobra.Command{
if num > 0 {
hostURL.Path = path.Join(hostURL.Path, strconv.FormatInt(num, 10))
} else {
currentBranch, err := git.CurrentBranch()
if err != nil {
log.Fatal(err)
}
mrs, err := lab.MRList(rn, gitlab.ListProjectMergeRequestsOptions{
ListOptions: gitlab.ListOptions{
PerPage: 10,
},
Labels: mrLabels,
State: &mrState,
OrderBy: gitlab.String("updated_at"),
SourceBranch: git.CurrentBranch()
SourceBranch: gitlab.String(currentBranch),
}, -1)
if err != nil {
log.Fatal(err)
Expand Down

0 comments on commit fc4ca81

Please sign in to comment.