Add comment for the design of "user activity time" (#37195)
This commit is contained in:
@@ -327,7 +327,7 @@ func (a *actionNotifier) PushCommits(ctx context.Context, pusher *user_model.Use
|
||||
|
||||
opType := activities_model.ActionCommitRepo
|
||||
|
||||
// Check it's tag push or branch.
|
||||
// Check its tag push or branch.
|
||||
if opts.RefFullName.IsTag() {
|
||||
opType = activities_model.ActionPushTag
|
||||
if opts.IsDelRef() {
|
||||
@@ -337,6 +337,11 @@ func (a *actionNotifier) PushCommits(ctx context.Context, pusher *user_model.Use
|
||||
opType = activities_model.ActionDeleteBranch
|
||||
}
|
||||
|
||||
// HINT: USER-ACTIVITY-PUSH-COMMITS: it's said that the time of push commits (for user activity display) is designed this way,
|
||||
// it doesn't use git commit's time, it only uses the doer's action time.
|
||||
// ref: https://github.com/go-gitea/gitea/pull/36469#issuecomment-3901955347
|
||||
// ref: https://github.com/go-gitea/gitea/issues/14051
|
||||
// ref: https://github.com/go-gitea/gitea/issues/11861#issuecomment-643162143
|
||||
if err = NotifyWatchers(ctx, &activities_model.Action{
|
||||
ActUserID: pusher.ID,
|
||||
ActUser: pusher,
|
||||
|
||||
Reference in New Issue
Block a user