mirror of
https://github.com/go-gitea/gitea
synced 2025-01-18 21:54:27 +00:00
49b98e45bc
Fix #28328 ``` func (p *PullRequestComment) GetDiffHunk() string { if p == nil || p.DiffHunk == nil { return "" } return *p.DiffHunk } ``` This function in the package `go-github` may return an empty diff. When it's empty, the following code will panic because it access `ss[1]`ec1feedbf5/services/migrations/gitea_uploader.go (L861-L867)
ec1feedbf5/modules/git/diff.go (L97-L101)