forgejo/models/git
oliverpool 525accfae6 Add container.FilterSlice function (gitea#30339)
Many places have the following logic:
```go
func (jobs ActionJobList) GetRunIDs() []int64 {
	ids := make(container.Set[int64], len(jobs))
	for _, j := range jobs {
		if j.RunID == 0 {
			continue
		}
		ids.Add(j.RunID)
	}
	return ids.Values()
}
```

this introduces a `container.FilterMapUnique` function, which reduces
the code above to:
```go
func (jobs ActionJobList) GetRunIDs() []int64 {
	return container.FilterMapUnique(jobs, func(j *ActionRunJob) (int64, bool) {
		return j.RunID, j.RunID != 0
	})
}
```
Conflicts:
models/issues/comment_list.go due to premature refactor in #3116
2024-04-16 11:49:44 +02:00
..
TestIterateRepositoryIDsWithLFSMetaObjects Refactor LFS GC functions 2024-04-05 16:49:15 +02:00
branch.go [PORT] gitea#30430: Fix rename branch 500 when the target branch is deleted but exist in database 2024-04-15 16:03:09 +02:00
branch_list.go Add container.FilterSlice function (gitea#30339) 2024-04-16 11:49:44 +02:00
branch_test.go Fix schedule tasks bugs (#28691) 2024-03-25 16:25:02 +01:00
commit_status.go [CHORE] Remove Microsoft SQL Server Support 2024-04-05 23:37:36 +02:00
commit_status_test.go fix commit_status 2024-03-24 07:11:19 +01:00
lfs.go Refactor LFS GC functions 2024-04-05 16:49:15 +02:00
lfs_lock.go
lfs_test.go Refactor LFS GC functions 2024-04-05 16:49:15 +02:00
main_test.go
protected_banch_list_test.go
protected_branch.go [FEAT] Configure if protected branch rule should apply to admins 2024-03-29 00:21:49 +01:00
protected_branch_list.go
protected_branch_test.go
protected_tag.go
protected_tag_test.go