ejoffe / spr

Stacked Pull Requests on GitHub
MIT License
796 stars 68 forks source link

Crash in assigning reviewers #260

Closed dhalperi closed 1 year ago

dhalperi commented 2 years ago

Just brew upgraded to 0.9.1, and now getting this crash trying to assign reviewers:

(bazel) dan@dan batfish-enterprise % brew upgrade spr   
Warning: ejoffe/tap/spr 0.9.1 already installed

Logs:

% git spr up -r OMITTED
> git rev-parse --show-toplevel
> git fetch
> git branch --no-color
> git rebase origin/master --autostash
> github fetch pull requests
> git branch --no-color
> git branch --no-color
> git branch --no-color
> git log --no-color origin/master..HEAD
> git status --porcelain --untracked-files=no
> git push --force --atomic origin OMITTED
> git branch --no-color
> github create 8850 : OMITTED
> github get assignable users
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1376ed5]

goroutine 1 [running]:
github.com/ejoffe/spr/github/githubclient.(*client).GetAssignableUsers(0xc00000eed0, {0x152d150, 0xc0000280a0})
    /Users/runner/work/spr/spr/github/githubclient/client.go:269 +0x235
github.com/ejoffe/spr/spr.(*stackediff).UpdatePullRequests(0xc000078ea0, {0x152d150, 0xc0000280a0}, {0xc0001f6500, 0x1, 0x1}, 0x0)
    /Users/runner/work/spr/spr/spr/spr.go:194 +0xe82
main.main.func3(0xc000078fc0)
    /Users/runner/work/spr/spr/cmd/spr/main.go:143 +0xdf
github.com/urfave/cli/v2.(*Command).Run(0xc0001cf7a0, 0xc000021440)
    /Users/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:163 +0x64a
github.com/urfave/cli/v2.(*App).RunContext(0xc000115d40, {0x152d150, 0xc0000280a0}, {0xc0000200c0, 0x4, 0x4})
    /Users/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:313 +0x81e
github.com/urfave/cli/v2.(*App).Run(...)
    /Users/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:224
main.main()
    /Users/runner/work/spr/spr/cmd/spr/main.go:200 +0x1099
ejoffe commented 1 year ago

Fixed in v11.2