gitea/routers/api/v1
wxiaoguang fb26b01688
Update object repo with the migrated repository (#18684) (#18726)
When migrating a repository (from GitHub) using the API (**POST** `repos/migrate`), the Code Indexer is not updated. Searching in the user interface will not return any results.

When migrating the same repository using **+/New Migration** in the web interface, the search index is updated and searching works as expected.

Caused by the fact that object `repo` is never updated with the migrated repo so `setting.Indexer.RepoIndexerEnabled && !repo.IsEmpty` in `modules/notification/indexer/indexer.go:NotifyMigrateRepository` always evaluates to `false`.

Tested with gitea:1.16.1, MariaDB:10, Breve in `Run Mode: Dev`.

Co-authored-by: Hugo Hoitink <10838836+hoitih@users.noreply.github.com>
2022-02-11 17:23:41 +01:00
..
admin Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
misc Move keys to models/asymkey (#17917) 2021-12-10 16:14:24 +08:00
notify Simplify parameter types (#18006) 2021-12-20 04:41:31 +00:00
org Add `GetUserTeams` (#18499) (#18531) 2022-02-02 08:40:04 +00:00
repo Update object repo with the migrated repository (#18684) (#18726) 2022-02-11 17:23:41 +01:00
settings Make mirror feature more configurable (#16957) 2021-09-07 17:49:36 +02:00
swagger Add API to get issue/pull comments and events (timeline) (#17403) 2022-01-01 22:12:25 +08:00
user Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
utils Use a standalone struct name for Organization (#17632) 2021-11-19 19:41:40 +08:00
api.go Add API to get issue/pull comments and events (timeline) (#17403) 2022-01-01 22:12:25 +08:00