gitforge/models
Andreas Ahlenstorf 4894725b64 [v15.0/forgejo] fix: ensure runners either belong to owner or repo when updated (#13262) (#13269)
A runner can either belong to an owner (user, organization) or a repository, not both. While `CreateRunner()` enforces that, `UpdateRunner()` does not, which leads to bugs. With this change, `UpdateRunner()` rejects runners that have _both_ fields set to prevent unexpected ownership changes.

Resolves https://codeberg.org/forgejo/forgejo/issues/12106 and makes https://codeberg.org/forgejo/forgejo/pulls/12117 obsolete.

### Tests for Go changes

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I ran...
  - [x] `make pr-go` before pushing

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [x] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change.
- [ ] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13262
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
(cherry picked from commit 85d38e354d)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13269
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
2026-07-01 20:20:45 +02:00
..
actions [v15.0/forgejo] fix: ensure runners either belong to owner or repo when updated (#13262) (#13269) 2026-07-01 20:20:45 +02:00
activities [v15.0/forgejo] fix(activitypub): only return public activities on request (#12533) 2026-05-12 04:57:33 +02:00
admin
asymkey chore: fix typos throughout the codebase (#10753) 2026-01-26 22:57:33 +01:00
auth [v15.0/forgejo] 2026-05-12 security patches (#12494) 2026-05-12 04:54:28 +02:00
avatars feat(perf): remove unused size url parameter for local avatars (#10932) 2026-01-20 04:59:15 +01:00
db [v15.0/forgejo] fix: make package cleanup work again (#12452) 2026-05-07 19:44:33 +02:00
dbfs [v15.0/forgejo]: chore: add modernizer linter (#11949) 2026-04-02 16:54:46 +02:00
fixtures [v15.0/forgejo]: 2026-06-10 security patches (#13002) 2026-06-10 06:03:26 +02:00
forgefed log instrumentation & test package (#10371) 2025-12-09 15:37:50 +01:00
forgejo/semver chore: move all test blank imports in a single package (#10662) 2026-01-02 05:32:32 +01:00
forgejo_migrations [v15.0/forgejo] feat: support timezone in scheduled workflows (#11986) 2026-04-04 19:16:35 +02:00
forgejo_migrations_legacy fix: normalize secrets consistently, display accurate help (#11052) 2026-02-09 17:02:18 +01:00
git [v15.0/forgejo]: 2026-06-10 security patches (#13002) 2026-06-10 06:03:26 +02:00
gitea_migrations [v15.0/forgejo]: chore: add modernizer linter (#11949) 2026-04-02 16:54:46 +02:00
issues [v15.0/forgejo] fix: Prevent unremovable review requests after submitting pending reviews (#12470) 2026-05-08 07:45:15 +02:00
moderation feat: render a link to poster profile next to the ID within shadow copy details (#10194) 2025-12-09 15:19:10 +01:00
organization [v15.0/forgejo] fix: paginate team members list (#12461) 2026-05-08 02:43:47 +02:00
packages [v15.0/forgejo] fix: Update swift package registry to use the metadata schema from the official Swift docs (#13209) 2026-06-27 23:53:56 +02:00
perm [v15.0/forgejo]: chore: add modernizer linter (#11949) 2026-04-02 16:54:46 +02:00
project [v15.0/forgejo]: chore: add modernizer linter (#11949) 2026-04-02 16:54:46 +02:00
pull [v15.0/forgejo]: chore: add modernizer linter (#11949) 2026-04-02 16:54:46 +02:00
quota chore: move all test blank imports in a single package (#10662) 2026-01-02 05:32:32 +01:00
repo [v15.0/forgejo] fix: load repo language for converting to api struct (#12789) 2026-05-28 18:02:09 +02:00
secret [v15.0/forgejo] fix: secret name-prefix regex (#12216) 2026-04-21 20:52:57 +02:00
shared/types
system chore: move all test blank imports in a single package (#10662) 2026-01-02 05:32:32 +01:00
unit [v15.0/forgejo]: chore: add modernizer linter (#11949) 2026-04-02 16:54:46 +02:00
unittest [v15.0/forgejo]: chore: add modernizer linter (#11949) 2026-04-02 16:54:46 +02:00
user [v15.0/forgejo]: 2026-06-10 security patches (#13002) 2026-06-10 06:03:26 +02:00
webhook [v15.0/forgejo]: chore: add modernizer linter (#11949) 2026-04-02 16:54:46 +02:00
error.go fix: don't allow credentials in migrate/push mirror URL 2025-08-30 08:07:23 +02:00
main_test.go chore: move all test blank imports in a single package (#10662) 2026-01-02 05:32:32 +01:00
org.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
org_team.go chore: split AddRepository and AddTeamMember to return the inserted value (#11342) 2026-03-11 03:40:32 +01:00
org_team_test.go chore: split AddRepository and AddTeamMember to return the inserted value (#11342) 2026-03-11 03:40:32 +01:00
org_test.go
repo.go [v15.0/forgejo] fix: cleanup data before migration retry (#12422) 2026-05-06 15:31:51 +02:00
repo_test.go
repo_transfer.go chore: fix typos throughout the codebase (#10753) 2026-01-26 22:57:33 +01:00
repo_transfer_test.go chore: fix typos throughout the codebase (#10753) 2026-01-26 22:57:33 +01:00