forgejo/routers/web/shared
forgejo-backport-action 010366d641 [v13.0/forgejo] fix: package cleaned rule fails if the keep count is too high (#9471)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/9468

If the keep count of a cleanup rule is greater than the number of available packages, it fails with:

```
panic(boundsError{x: int64(x), signed: true, y: y, code: boundsSliceB})
.../packages/packages.go:175
.../routers/web/org/setting_packages.go:108
```

Regression of https://codeberg.org/forgejo/forgejo/pulls/9219/files

Refs https://codeberg.org/forgejo/forgejo/issues/9461

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/9468): <!--number 9468 --><!--line 0 --><!--description cGFja2FnZSBjbGVhbmVkIHJ1bGUgZmFpbHMgaWYgdGhlIGtlZXAgY291bnQgaXMgdG9vIGhpZ2g=-->package cleaned rule fails if the keep count is too high<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Earl Warren <contact@earl-warren.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9471
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2025-09-29 18:01:24 +02:00
..
actions fix: display the list of tasks in the runner edit page (#7650) 2025-04-25 11:59:54 +00:00
packages [v13.0/forgejo] fix: package cleaned rule fails if the keep count is too high (#9471) 2025-09-29 18:01:24 +02:00
project chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
secrets chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
user feat: allow any README for .profile (#8798) 2025-09-01 13:58:00 +02:00
storage_overview.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00