restore-repo
does not correctly load "issue foreign ID"s
#22414
Labels
restore-repo
does not correctly load "issue foreign ID"s
#22414
Description
In short: the struct field
migration.Issue.ForeignIndex
is missing ayaml:"foreign_id"
annotation.When importing a dump from YAML files via
gitea restore-repo
, the "foreign ID" of an issue is used to load that issue's comments (seefunc (r *RepositoryRestorer) GetComments(...)
). On first glance this ID should be stored inissue.yml
in theforeign_id
field, but because there is only a JSON tag and not a YAML one, effectively Gitea is reading it fromforeignindex
.This issue was introduced in fa73cbf. Where all the fields that should get an underscore in the name are annotated for both YAML and JSON, the
ForeignIndex
is not:Gitea Version
1.19.0+dev-289-gb36854df3
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.34.1
Operating System
No response
How are you running Gitea?
Built Gitea myself from its
main
branch.Database
PostgreSQL
The text was updated successfully, but these errors were encountered: