Files
gitocean/models
limiting-factorandGusted d2acd4f14c chore: split AddRepository and AddTeamMember to return the inserted value (#11342)
Split [AddRepository][0] and [AddTeamMember][1] to functions that return the inserted value. These can be used by the F3 driver to obtain the ID of the TeamRepo and TeamUser rows inserted in the database.

Add test coverage for both functions and remove a duplicated test. Integration tests also already [make use of AddRepository and AddTeamMember][2] indirectly.

[0]: https://codeberg.org/forgejo/forgejo/src/commit/f8bee35e7717e33a8dc122b038dd6335a198449c/models/org_team.go#L26
[1]: https://codeberg.org/forgejo/forgejo/src/commit/f8bee35e7717e33a8dc122b038dd6335a198449c/models/org_team.go#L359
[2]: https://codeberg.org/forgejo/forgejo/src/commit/f8bee35e7717e33a8dc122b038dd6335a198449c/tests/integration/api_helper_for_declarative_test.go#L461-L483

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11342
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: limiting-factor <limiting-factor@posteo.com>
Co-committed-by: limiting-factor <limiting-factor@posteo.com>
2026-03-11 03:40:32 +01:00
..
2026-03-06 11:21:07 -07:00
2026-03-06 11:21:07 -07:00
2025-03-27 19:40:14 +00:00