You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/services/migrations
Giteabot 8b590de186
Fix migration panic due to an empty review comment diff (#28334) (#28362)
Backport #28334 by @lng2020

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)

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
1 year ago
..
codebase.go Replace `interface{}` with `any` (#25686) 2 years ago
codebase_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
common.go Replace `interface{}` with `any` (#25686) 2 years ago
dump.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
error.go Update github.com/google/go-github to v53 (#25157) 2 years ago
git.go Implement FSFE REUSE for golang files (#21840) 2 years ago
gitbucket.go Rewrite logger system (#24726) 2 years ago
gitea_downloader.go Fix DownloadFunc when migrating releases (#27887) (#27890) 1 year ago
gitea_downloader_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
gitea_uploader.go Fix migration panic due to an empty review comment diff (#28334) (#28362) 1 year ago
gitea_uploader_test.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
github.go Fix panic when migrating a repo from GitHub with issues (#25246) 2 years ago
github_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
gitlab.go Fix DownloadFunc when migrating releases (#27887) (#27890) 1 year ago
gitlab_test.go GitLab migration: Sanitize response for reaction list (#25054) 2 years ago
gogs.go Rewrite logger system (#24726) 2 years ago
gogs_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
http_client.go Implement FSFE REUSE for golang files (#21840) 2 years ago
main_test.go Scoped labels (#22585) 2 years ago
migrate.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
migrate_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
onedev.go Replace `interface{}` with `any` (#25686) 2 years ago
onedev_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
restore.go Implement FSFE REUSE for golang files (#21840) 2 years ago
update.go Another round of `db.DefaultContext` refactor (#27103) (#27262) 1 year ago