mirror of https://github.com/go-gitea/gitea.git
Prepare Issues, Comments, and PR structs for future integration with spam prevention services
This commit is contained in:
parent
951f02ff1c
commit
2d9cae515b
|
@ -294,6 +294,16 @@ type Comment struct {
|
||||||
ReviewID int64 `xorm:"index"`
|
ReviewID int64 `xorm:"index"`
|
||||||
Invalidated bool
|
Invalidated bool
|
||||||
|
|
||||||
|
// Store IP and UserAgent that will be temporarily stored for
|
||||||
|
// life of the struct so that it could potentially be used
|
||||||
|
// for sending to akismet or other spam detection services.
|
||||||
|
UserIP string `xorm:"-"`
|
||||||
|
UserAgent string `xorm:"-"`
|
||||||
|
|
||||||
|
// Spam services will return a risk level. Could be used in
|
||||||
|
// the future to have a threshold for preventing sending emails.
|
||||||
|
RiskLevel int `xorm:"-"`
|
||||||
|
|
||||||
// Reference an issue or pull from another comment, issue or PR
|
// Reference an issue or pull from another comment, issue or PR
|
||||||
// All information is about the origin of the reference
|
// All information is about the origin of the reference
|
||||||
RefRepoID int64 `xorm:"index"` // Repo where the referencing
|
RefRepoID int64 `xorm:"index"` // Repo where the referencing
|
||||||
|
|
|
@ -141,6 +141,16 @@ type Issue struct {
|
||||||
TotalTrackedTime int64 `xorm:"-"`
|
TotalTrackedTime int64 `xorm:"-"`
|
||||||
Assignees []*user_model.User `xorm:"-"`
|
Assignees []*user_model.User `xorm:"-"`
|
||||||
|
|
||||||
|
// Store IP and UserAgent that will be temporarily stored for
|
||||||
|
// life of the struct so that it could potentially be used
|
||||||
|
// for sending to akismet or other spam detection services.
|
||||||
|
UserIP string `xorm:"-"`
|
||||||
|
UserAgent string `xorm:"-"`
|
||||||
|
|
||||||
|
// Spam services will return a risk level. Could be used in
|
||||||
|
// the future to have a threshold for preventing sending emails.
|
||||||
|
RiskLevel int `xorm:"-"`
|
||||||
|
|
||||||
// IsLocked limits commenting abilities to users on an issue
|
// IsLocked limits commenting abilities to users on an issue
|
||||||
// with write access
|
// with write access
|
||||||
IsLocked bool `xorm:"NOT NULL DEFAULT false"`
|
IsLocked bool `xorm:"NOT NULL DEFAULT false"`
|
||||||
|
|
|
@ -178,6 +178,16 @@ type PullRequest struct {
|
||||||
MergeBase string `xorm:"VARCHAR(64)"`
|
MergeBase string `xorm:"VARCHAR(64)"`
|
||||||
AllowMaintainerEdit bool `xorm:"NOT NULL DEFAULT false"`
|
AllowMaintainerEdit bool `xorm:"NOT NULL DEFAULT false"`
|
||||||
|
|
||||||
|
// Store IP and UserAgent that will be temporarily stored for
|
||||||
|
// life of the struct so that it could potentially be used
|
||||||
|
// for sending to akismet or other spam detection services.
|
||||||
|
UserIP string `xorm:"-"`
|
||||||
|
UserAgent string `xorm:"-"`
|
||||||
|
|
||||||
|
// Spam services will return a risk level. Could be used in
|
||||||
|
// the future to have a threshold for preventing sending emails.
|
||||||
|
RiskLevel int `xorm:"-"`
|
||||||
|
|
||||||
HasMerged bool `xorm:"INDEX"`
|
HasMerged bool `xorm:"INDEX"`
|
||||||
MergedCommitID string `xorm:"VARCHAR(64)"`
|
MergedCommitID string `xorm:"VARCHAR(64)"`
|
||||||
MergerID int64 `xorm:"INDEX"`
|
MergerID int64 `xorm:"INDEX"`
|
||||||
|
|
Loading…
Reference in New Issue