mirror of
https://github.com/go-gitea/tea.git
synced 2026-07-19 23:33:31 -04:00
[GH-ISSUE #17] pulls panic if there is no open pull requests #12
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @quantonganh on GitHub (Apr 19, 2019).
Original GitHub issue: https://github.com/go-gitea/tea/issues/17
The reason is: https://github.com/go-gitea/go-sdk/issues/161
@lunny commented on GitHub (Apr 19, 2019):
Cannot reproduce here.
@quantonganh commented on GitHub (Apr 19, 2019):
Look at the error, it happened at this line: https://github.com/go-gitea/tea/blob/fb52920af9254e5746997c57745fc11b804106da/cmd/pulls.go#L52
The main problem is
ListPullRequestsOptionsdoes not work. Instead of just list open pull requests, it list all.In your repo, just
tea pullsto see it show all closed/merged PRs.
@root360-AndreasUlm commented on GitHub (Apr 21, 2019):
I can reproduce this behaviour.
Printing the resulting addresses of ListRepoPullRequests when the error happens you get:
The access to the 3rd element then raises the panic.
After adding a 'nil'-check the panic is not raised:
@lunny commented on GitHub (Apr 22, 2019):
@root360-AndreasUlm could you send a PR to fix that?
@root360-AndreasUlm commented on GitHub (Apr 23, 2019):
@lunny I'll send a PR today
@root360-AndreasUlm commented on GitHub (Apr 23, 2019):
@lunny created PR https://github.com/go-gitea/tea/pull/18
pulls panic if there is no open pull requeststo [GH-ISSUE #17] pulls panic if there is no open pull requests