mirror of
https://gitea.com/jolheiser/sip
synced 2024-11-22 11:41:59 +01:00
Fix PR head nil panic (#7)
Fix PR head nil panic Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: jolheiser <john.olheiser@gmail.com> Reviewed-on: https://gitea.com/jolheiser/sip/pulls/7
This commit is contained in:
parent
bb773780df
commit
1956062791
@ -27,6 +27,9 @@ func doPullStatus(ctx *cli.Context) error {
|
||||
|
||||
var pr *gitea.PullRequest
|
||||
for _, pull := range pulls {
|
||||
if pull.Head == nil {
|
||||
continue
|
||||
}
|
||||
compare := fmt.Sprintf("%s:%s", pull.Head.Repository.Owner.UserName, pull.Head.Name)
|
||||
if compare == head {
|
||||
pr = pull
|
||||
|
Loading…
Reference in New Issue
Block a user