diff options
author | Yarden Shoham <git@yardenshoham.com> | 2023-05-14 19:04:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-14 16:04:24 +0000 |
commit | 6d2c63f6ffcbcd4a928b39527ecfd2cb53a2828c (patch) | |
tree | 9ef75099e9ead639edcf1c79091c812c3c9972b4 /models/actions | |
parent | 5968c63a11c94b0fdde0485af194bebb2ea1b8e7 (diff) | |
download | gitea-6d2c63f6ffcbcd4a928b39527ecfd2cb53a2828c.tar.gz gitea-6d2c63f6ffcbcd4a928b39527ecfd2cb53a2828c.zip |
Don't filter action runs based on state (#24711)
We should just show all runs. This removes the filtering altogether.
- Replaces https://github.com/go-gitea/gitea/pull/24553
# Before


# After

---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Diffstat (limited to 'models/actions')
-rw-r--r-- | models/actions/run_list.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/models/actions/run_list.go b/models/actions/run_list.go index 18790db525..56de8eb916 100644 --- a/models/actions/run_list.go +++ b/models/actions/run_list.go @@ -10,7 +10,6 @@ import ( repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/container" - "code.gitea.io/gitea/modules/util" "xorm.io/builder" ) @@ -69,7 +68,6 @@ type FindRunOptions struct { db.ListOptions RepoID int64 OwnerID int64 - IsClosed util.OptionalBool WorkflowFileName string TriggerUserID int64 Approved bool // not util.OptionalBool, it works only when it's true @@ -83,14 +81,6 @@ func (opts FindRunOptions) toConds() builder.Cond { if opts.OwnerID > 0 { cond = cond.And(builder.Eq{"owner_id": opts.OwnerID}) } - if opts.IsClosed.IsFalse() { - cond = cond.And(builder.Eq{"status": StatusWaiting}.Or( - builder.Eq{"status": StatusRunning})) - } else if opts.IsClosed.IsTrue() { - cond = cond.And( - builder.Neq{"status": StatusWaiting}.And( - builder.Neq{"status": StatusRunning})) - } if opts.WorkflowFileName != "" { cond = cond.And(builder.Eq{"workflow_id": opts.WorkflowFileName}) } |