You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers/api/v1/repo
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>
3 years ago
..
blob.go
branch.go Move repository model into models/repo (#17933) 3 years ago
collaborators.go Move repository model into models/repo (#17933) 3 years ago
commits.go Add API to get file commit history (#17652) 3 years ago
file.go Fix various typos (#18219) 3 years ago
fork.go - name: new parameter in CreateForkOption to give the forked repository (#18066) 3 years ago
git_hook.go
git_ref.go
hook.go Move accessmode into models/perm (#17828) 3 years ago
hook_test.go
issue.go Move user related model into models/user (#17781) 3 years ago
issue_comment.go Fix PR comments UI (#18323) 3 years ago
issue_label.go
issue_reaction.go Add missing `X-Total-Count` and fix some related bugs (#17968) 3 years ago
issue_stopwatch.go
issue_subscription.go When attempting to subscribe other user to issue report why access denied (#18091) 3 years ago
issue_tracked_time.go Move user related model into models/user (#17781) 3 years ago
key.go Move keys to models/asymkey (#17917) 3 years ago
label.go
language.go Move repository model into models/repo (#17933) 3 years ago
main_test.go
migrate.go Update object repo with the migrated repository (#18684) (#18726) 3 years ago
milestone.go
mirror.go
notes.go
pull.go Use indirect comparison when showing pull requests (#18313) 3 years ago
pull_review.go Move user related model into models/user (#17781) 3 years ago
release.go Move accessmode into models/perm (#17828) 3 years ago
release_attachment.go
release_tags.go
repo.go Some repository refactors (#17950) 3 years ago
repo_test.go Move repository model into models/repo (#17933) 3 years ago
star.go Some repository refactors (#17950) 3 years ago
status.go Add missing `X-Total-Count` and fix some related bugs (#17968) 3 years ago
subscriber.go Some repository refactors (#17950) 3 years ago
tag.go Fix NPE on try to get tag reference via API (#18245) 3 years ago
teams.go Move repository model into models/repo (#17933) 3 years ago
topic.go Some repository refactors (#17950) 3 years ago
transfer.go Add API to manage repo tranfers (#17963) 3 years ago
tree.go Add missing `X-Total-Count` and fix some related bugs (#17968) 3 years ago
wiki.go Add missing `X-Total-Count` and fix some related bugs (#17968) 3 years ago