summaryrefslogtreecommitdiffstats
path: root/modules/migration
diff options
context:
space:
mode:
authorsinguliere <35190819+singuliere@users.noreply.github.com>2022-03-06 20:00:41 +0100
committerGitHub <noreply@github.com>2022-03-06 20:00:41 +0100
commitcc643284de106a609b4ac03ed2a7f615ab6d312a (patch)
tree8fa1a70d658a6185d4e7cdcef80000cc47e81e74 /modules/migration
parentb24e8d38af21fc1857b6aa66351627e3b1761608 (diff)
downloadgitea-cc643284de106a609b4ac03ed2a7f615ab6d312a.tar.gz
gitea-cc643284de106a609b4ac03ed2a7f615ab6d312a.zip
Add Index to comment for migrations and mirroring (#18806)
Comments have an id (see Gitea[0], GitLab[1], GitHub[2], etc.), and the comment migration format must represent it during migrations so that it can be used during mirroring or incremental migrations. [0] https://try.gitea.io/api/swagger#/issue/issueGetComment [1] https://docs.gitlab.com/ee/api/discussions.html#get-single-issue-discussion-item [2] https://docs.github.com/en/rest/reference/issues#get-an-issue-comment Signed-off-by: Loïc Dachary <loic@dachary.org> Co-authored-by: Loïc Dachary <loic@dachary.org>
Diffstat (limited to 'modules/migration')
-rw-r--r--modules/migration/comment.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/migration/comment.go b/modules/migration/comment.go
index 36277129d9..f364ffc93a 100644
--- a/modules/migration/comment.go
+++ b/modules/migration/comment.go
@@ -9,7 +9,8 @@ import "time"
// Comment is a standard comment information
type Comment struct {
- IssueIndex int64 `yaml:"issue_index"`
+ IssueIndex int64 `yaml:"issue_index"`
+ Index int64
PosterID int64 `yaml:"poster_id"`
PosterName string `yaml:"poster_name"`
PosterEmail string `yaml:"poster_email"`