aboutsummaryrefslogtreecommitdiffstats
path: root/modules/migration/issue.go
diff options
context:
space:
mode:
authorAravinth Manivannan <realaravinth@batsense.net>2022-01-26 09:45:51 +0000
committerGitHub <noreply@github.com>2022-01-26 10:45:51 +0100
commit3bb028cc46401a8a54ecab7e7c035dbb24937b6c (patch)
treebff1aaaaa9d5eef6b9d1c520337e3cc51153b9e2 /modules/migration/issue.go
parent49dd9067535538771ef13623ed1dd9698a4a2151 (diff)
downloadgitea-3bb028cc46401a8a54ecab7e7c035dbb24937b6c.tar.gz
gitea-3bb028cc46401a8a54ecab7e7c035dbb24937b6c.zip
Validate migration files (#18203)
JSON Schema validation for data used by Gitea during migrations Discussion at https://forum.forgefriends.org/t/common-json-schema-for-repository-information/563 Co-authored-by: Loïc Dachary <loic@dachary.org>
Diffstat (limited to 'modules/migration/issue.go')
-rw-r--r--modules/migration/issue.go32
1 files changed, 16 insertions, 16 deletions
diff --git a/modules/migration/issue.go b/modules/migration/issue.go
index 26812633f9..19781ad984 100644
--- a/modules/migration/issue.go
+++ b/modules/migration/issue.go
@@ -28,21 +28,21 @@ func (c BasicIssueContext) ForeignID() int64 {
// Issue is a standard issue information
type Issue struct {
- Number int64
- PosterID int64 `yaml:"poster_id"`
- PosterName string `yaml:"poster_name"`
- PosterEmail string `yaml:"poster_email"`
- Title string
- Content string
- Ref string
- Milestone string
- State string // closed, open
- IsLocked bool `yaml:"is_locked"`
- Created time.Time
- Updated time.Time
- Closed *time.Time
- Labels []*Label
- Reactions []*Reaction
- Assignees []string
+ Number int64 `json:"number"`
+ PosterID int64 `yaml:"poster_id" json:"poster_id"`
+ PosterName string `yaml:"poster_name" json:"poster_name"`
+ PosterEmail string `yaml:"poster_email" json:"poster_email"`
+ Title string `json:"title"`
+ Content string `json:"content"`
+ Ref string `json:"ref"`
+ Milestone string `json:"milestone"`
+ State string `json:"state"` // closed, open
+ IsLocked bool `yaml:"is_locked" json:"is_locked"`
+ Created time.Time `json:"created"`
+ Updated time.Time `json:"updated"`
+ Closed *time.Time `json:"closed"`
+ Labels []*Label `json:"labels"`
+ Reactions []*Reaction `json:"reactions"`
+ Assignees []string `json:"assignees"`
Context IssueContext `yaml:"-"`
}