0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-03 19:03:05 +02:00

Merge 2d9cae515b6f6df86041d2c31b17469e2199b5ff into 30c07c20e94551141cc1873ab14bdd4c104bba94

This commit is contained in:
techknowlogick 2026-04-03 09:22:03 +02:00 committed by GitHub
commit a0fa423f75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 30 additions and 0 deletions

View File

@ -312,6 +312,16 @@ type Comment struct {
ReviewID int64 `xorm:"index"`
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
// All information is about the origin of the reference
RefRepoID int64 `xorm:"index"` // Repo where the referencing

View File

@ -113,6 +113,16 @@ type Issue struct {
TotalTrackedTime int64 `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
// with write access
IsLocked bool `xorm:"NOT NULL DEFAULT false"`

View File

@ -143,6 +143,16 @@ type PullRequest struct {
MergeBase string `xorm:"VARCHAR(64)"`
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"`
MergedCommitID string `xorm:"VARCHAR(64)"`
MergerID int64 `xorm:"INDEX"`