remove some unused changes

This commit is contained in:
Zettat123 2024-12-17 14:04:10 +08:00
parent 130f2a2222
commit 4341ef0fc7
2 changed files with 1 additions and 24 deletions

View File

@ -71,7 +71,6 @@ type FindRunOptions struct {
TriggerEvent webhook_module.HookEventType TriggerEvent webhook_module.HookEventType
Approved bool // not util.OptionalBool, it works only when it's true Approved bool // not util.OptionalBool, it works only when it's true
Status []Status Status []Status
SortType string
ConcurrencyGroup string ConcurrencyGroup string
} }
@ -108,14 +107,7 @@ func (opts FindRunOptions) ToConds() builder.Cond {
} }
func (opts FindRunOptions) ToOrders() string { func (opts FindRunOptions) ToOrders() string {
switch opts.SortType { return "`id` DESC"
case "oldest":
return "created ASC"
case "newest":
return "created DESC"
default:
return "`id` DESC"
}
} }
type StatusInfo struct { type StatusInfo struct {

View File

@ -92,18 +92,3 @@ func findTaskNeeds(ctx context.Context, task *actions_model.ActionTask) (map[str
return ret, nil return ret, nil
} }
// mergeTwoOutputs merges two outputs from two different ActionRunJobs
// Values with the same output name may be overridden. The user should ensure the output names are unique.
// See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#using-job-outputs-in-a-matrix-job
func mergeTwoOutputs(o1, o2 map[string]string) map[string]string {
ret := make(map[string]string, len(o1))
for k1, v1 := range o1 {
if len(v1) > 0 {
ret[k1] = v1
} else {
ret[k1] = o2[k1]
}
}
return ret
}