Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lab mr b doesn't work anymore #271

Closed
MartinDelille opened this issue Dec 21, 2018 · 10 comments
Closed

lab mr b doesn't work anymore #271

MartinDelille opened this issue Dec 21, 2018 · 10 comments
Milestone

Comments

@MartinDelille
Copy link
Contributor

The lab mr b feature opening the current merge request in the browser doesn't work anymore in the latest version (0.14.0).

@zaquestion
Copy link
Owner

@MartinDelille This feature was released in 0.14.0 #221 -- I just gave it a shot locally and saw the desired behavior. Additionally the test seems to be working as well.

$ GO111MODULE=on make test run=Test_mrBrowseWithParameter
ok      github.com/zaquestion/lab/cmd   1.286s  coverage: 10.7% of statements in ./...

Let me know what you're seeing and I'll try and help

@MartinDelille
Copy link
Contributor Author

Ok sorry I thought I was using the good version but I was still on an old one.

FYI, I tried debugging it my self and had this unrelated error on master:

$ make
go build -ldflags "-X \"main.version=v0.14.0-25-gbe24c68\"" github.com/zaquestion/lab
# github.com/zaquestion/lab/internal/gitlab
internal/gitlab/gitlab.go:387:61: undefined: gitlab.Discussion
internal/gitlab/gitlab.go:393:20: undefined: gitlab.Discussion
internal/gitlab/gitlab.go:394:10: undefined: gitlab.ListIssueDiscussionsOptions
internal/gitlab/gitlab.go:402:22: lab.Discussions undefined (type *gitlab.Client has no field or method Discussions)
make: *** [build] Error 2

@zaquestion
Copy link
Owner

Yeah the make file should probably set modules to on. It's needs to be GO111MODULE=on make now

@MartinDelille
Copy link
Contributor Author

I could indeed have guess it from the .travis.yml file but keeping a simple make command make easier for random contributor like me to have quickly a dev environment set up.

@MartinDelille
Copy link
Contributor Author

MartinDelille commented Feb 13, 2019

This command fails again with the latest version (0.15.2):

$ lab mr browse
panic: interface conversion: interface {} is map[string]interface {}, not []map[string]interface {}

goroutine 1 [running]:
github.com/zaquestion/lab/cmd.glob..func23(0x1a4c8a0, 0x1a74908, 0x0, 0x0)
	/home/travis/gopath/src/github.com/zaquestion/lab/cmd/mr_browse.go:28 +0x7be
github.com/spf13/cobra.(*Command).execute(0x1a4c8a0, 0x1a74908, 0x0, 0x0, 0x1a4c8a0, 0x1a74908)
	/home/travis/gopath/pkg/mod/github.com/rsteube/cobra@v0.0.1-zsh-completion-custom/command.go:769 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0x1a4a0a0, 0x1a4c8a0, 0x1a74908, 0xc00022c218)
	/home/travis/gopath/pkg/mod/github.com/rsteube/cobra@v0.0.1-zsh-completion-custom/command.go:855 +0x2fd
github.com/spf13/cobra.(*Command).Execute(0x1a4a0a0, 0xc00008c040, 0x2)
	/home/travis/gopath/pkg/mod/github.com/rsteube/cobra@v0.0.1-zsh-completion-custom/command.go:803 +0x2b
github.com/zaquestion/lab/cmd.Execute()
	/home/travis/gopath/src/github.com/zaquestion/lab/cmd/root.go:289 +0x186
main.main()
	/home/travis/gopath/src/github.com/zaquestion/lab/main.go:127 +0x5e

@MartinDelille MartinDelille reopened this Feb 20, 2019
@zaquestion
Copy link
Owner

Yikes @MartinDelille so sorry for the trouble! And that I'm only just seeing this! From the error looks like a regression in some of the config handling, I'll get a fix out soon.

@zaquestion zaquestion added this to the 0.15.3 milestone Feb 21, 2019
@MartinDelille
Copy link
Contributor Author

I managed to fix it by forcing my gitlab url here: https://github.com/zaquestion/lab/blob/master/cmd/mr_browse.go#L27-L29

@zaquestion
Copy link
Owner

zaquestion commented Mar 17, 2019

Yeah goodness sorry, I've got a fix for it locally I haven't had a chance to push out :shame: -- will try to do that Monday. Tomorrow 3am harvest then farmers market

zaquestion added a commit that referenced this issue Mar 21, 2019
fix #271 (lab mr browse break) and fix #300 (lab alias is actually hub alias)
@zaquestion
Copy link
Owner

@MartinDelille Sorry for the delay, try it out in 0.15.3

@MartinDelille
Copy link
Contributor Author

It works! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants