Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mr_edit: Fix panic with --assign option
lab panics if the 'mr edit' assign option is used with an invalid username. panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x482346] goroutine 1 [running]: cmd.getUpdateAssignees /home/prarit/git-kernel/github/lab/cmd/edit_common.go:38 cmd.func38 /home/prarit/git-kernel/github/lab/cmd/mr_edit.go:122 github.x2ecom..z2fspf13..z2fcobra.Command.execute /home/prarit/go/pkg/mod/github.com/spf13/[email protected]/command.go:854 github.x2ecom..z2fspf13..z2fcobra.Command.ExecuteC /home/prarit/go/pkg/mod/github.com/spf13/[email protected]/command.go:958 github.x2ecom..z2fspf13..z2fcobra.Command.Execute /home/prarit/go/pkg/mod/github.com/spf13/[email protected]/command.go:895 github.x2ecom..z2fzaquestion..z2flab..z2fcmd.Execute /home/prarit/git-kernel/github/lab/cmd/root.go:244 main.main /home/prarit/git-kernel/github/lab/main.go:28 This occurs because the code does not check for a valid return from the getUserID() function. Check that the specified --assign users are valid GitLab usernames. Signed-off-by: Prarit Bhargava <[email protected]>
- Loading branch information