forgejo/services
Nanguan Lin 49b98e45bc
Fix migration panic due to an empty review comment diff (#28334)
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)
2023-12-05 08:29:43 +00:00
..
actions Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00
agit
asymkey Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00
attachment
auth Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00
automerge
context
convert
cron
externalaccount
feed
forms Fix required error for token name (#28267) 2023-11-29 03:47:05 +00:00
gitdiff
indexer Fix missing issue search index update when changing status (#28325) 2023-12-03 12:22:44 +01:00
issue
lfs
mailer
markup
migrations Fix migration panic due to an empty review comment diff (#28334) 2023-12-05 08:29:43 +00:00
mirror
notify
org
packages Fix RPM/Debian signature key creation (#28352) 2023-12-05 00:48:01 +00:00
pull Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00
release Fix comment permissions (#28213) 2023-11-25 17:21:21 +00:00
repository Make pushUpdate error verbose (#28263) 2023-11-30 00:46:51 +00:00
secrets Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00
task
uinotification
user Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00
webhook Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00
wiki