chore: re-enable nilnil lint for models/actions/task.go (#12768)

I added sentinel error values for jobs not being found and no jobs being updated by the `CreateTaskForRunner` function. This avoids the nilnil antipattern and allows the nilnil lint to be enabled for the `models/actions/task.go` file again.

The handling of these new errors was added to the `PickTask` function in `services/actions/task.go`.

Related issue: https://codeberg.org/forgejo/forgejo/issues/11261

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12768
Reviewed-by: limiting-factor <limiting-factor@noreply.codeberg.org>
Reviewed-by: elle <0xllx0@noreply.codeberg.org>
This commit is contained in:
Clouds
2026-06-05 01:38:23 +02:00
committed by Gusted
parent 2394f1a4e4
commit 044f3d95b6
7 changed files with 141 additions and 21 deletions
-3
View File
@@ -189,9 +189,6 @@ linters:
text: "(ST1005|ST1003|QF1001):"
# TODO: eventually remove this section entirely
- path: models/actions/task.go
linters:
- nilnil
- path: models/activities/action_list.go
linters:
- nilnil