You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // Copyright 2018 Jonas Franz. All rights reserved.
  3. // SPDX-License-Identifier: MIT
  4. package migration
  5. import "time"
  6. // Issue is a standard issue information
  7. type Issue struct {
  8. Number int64 `json:"number"`
  9. PosterID int64 `yaml:"poster_id" json:"poster_id"`
  10. PosterName string `yaml:"poster_name" json:"poster_name"`
  11. PosterEmail string `yaml:"poster_email" json:"poster_email"`
  12. Title string `json:"title"`
  13. Content string `json:"content"`
  14. Ref string `json:"ref"`
  15. Milestone string `json:"milestone"`
  16. State string `json:"state"` // closed, open
  17. IsLocked bool `yaml:"is_locked" json:"is_locked"`
  18. Created time.Time `json:"created"`
  19. Updated time.Time `json:"updated"`
  20. Closed *time.Time `json:"closed"`
  21. Labels []*Label `json:"labels"`
  22. Reactions []*Reaction `json:"reactions"`
  23. Assignees []string `json:"assignees"`
  24. ForeignIndex int64 `json:"foreign_id"`
  25. Context DownloaderContext `yaml:"-"`
  26. }
  27. // GetExternalName ExternalUserMigrated interface
  28. func (issue *Issue) GetExternalName() string { return issue.PosterName }
  29. // GetExternalID ExternalUserMigrated interface
  30. func (issue *Issue) GetExternalID() int64 { return issue.PosterID }
  31. func (issue *Issue) GetLocalIndex() int64 { return issue.Number }
  32. func (issue *Issue) GetForeignIndex() int64 { return issue.ForeignIndex }
  33. func (issue *Issue) GetContext() DownloaderContext { return issue.Context }