mirror of https://github.com/go-gitea/gitea.git
Drop `IDOrderDesc` for listing Actions task and always order by `id DESC` (#31150)
Close #31066 Just follow what `FindRunOptions` and `FindScheduleOptions` do.
This commit is contained in:
parent
1137a0357e
commit
572fa55fbc
|
@ -54,7 +54,6 @@ type FindTaskOptions struct {
|
||||||
UpdatedBefore timeutil.TimeStamp
|
UpdatedBefore timeutil.TimeStamp
|
||||||
StartedBefore timeutil.TimeStamp
|
StartedBefore timeutil.TimeStamp
|
||||||
RunnerID int64
|
RunnerID int64
|
||||||
IDOrderDesc bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (opts FindTaskOptions) ToConds() builder.Cond {
|
func (opts FindTaskOptions) ToConds() builder.Cond {
|
||||||
|
@ -84,8 +83,5 @@ func (opts FindTaskOptions) ToConds() builder.Cond {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (opts FindTaskOptions) ToOrders() string {
|
func (opts FindTaskOptions) ToOrders() string {
|
||||||
if opts.IDOrderDesc {
|
|
||||||
return "`id` DESC"
|
return "`id` DESC"
|
||||||
}
|
}
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
|
@ -80,7 +80,6 @@ func RunnerDetails(ctx *context.Context, page int, runnerID, ownerID, repoID int
|
||||||
PageSize: 30,
|
PageSize: 30,
|
||||||
},
|
},
|
||||||
Status: actions_model.StatusUnknown, // Unknown means all
|
Status: actions_model.StatusUnknown, // Unknown means all
|
||||||
IDOrderDesc: true,
|
|
||||||
RunnerID: runner.ID,
|
RunnerID: runner.ID,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue