-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DownloadFunc when migrating releases #27887
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to make the DownloadFunc a standard func giteaDownloadFunc(...)
, then there won't be such bug.
Head branch was pushed to by a user without write access
We should not use `asset.ID` in DownloadFunc because DownloadFunc is a closure. https://github.com/go-gitea/gitea/blob/1bf5527eac6b947010c8faf408f6747de2a2384f/services/migrations/gitea_downloader.go#L284-L295 A similar bug when migrating from GitHub has been fixed in go-gitea#14703. This PR fixes the bug when migrating from Gitea and GitLab.
We should not use `asset.ID` in DownloadFunc because DownloadFunc is a closure. https://github.com/go-gitea/gitea/blob/1bf5527eac6b947010c8faf408f6747de2a2384f/services/migrations/gitea_downloader.go#L284-L295 A similar bug when migrating from GitHub has been fixed in go-gitea#14703. This PR fixes the bug when migrating from Gitea and GitLab.
Backport #27887 by @Zettat123 We should not use `asset.ID` in DownloadFunc because DownloadFunc is a closure. https://github.com/go-gitea/gitea/blob/1bf5527eac6b947010c8faf408f6747de2a2384f/services/migrations/gitea_downloader.go#L284-L295 A similar bug when migrating from GitHub has been fixed in #14703. This PR fixes the bug when migrating from Gitea and GitLab. Co-authored-by: Zettat123 <zettat123@gmail.com>
Backport #27887 by @Zettat123 We should not use `asset.ID` in DownloadFunc because DownloadFunc is a closure. https://github.com/go-gitea/gitea/blob/1bf5527eac6b947010c8faf408f6747de2a2384f/services/migrations/gitea_downloader.go#L284-L295 A similar bug when migrating from GitHub has been fixed in #14703. This PR fixes the bug when migrating from Gitea and GitLab. Co-authored-by: Zettat123 <zettat123@gmail.com>
I was unable to create a backport for 1.20. @Zettat123, please send one manually. 🍵
|
I was unable to create a backport for 1.21. @Zettat123, please send one manually. 🍵
|
* upstream/main: Fix edit topic UI (go-gitea#27925) Unify two factor check (go-gitea#27915) Revert go-gitea#27870 (go-gitea#27917) Fix JS NPE when viewing specific range of PR commits (go-gitea#27912) Install poetry dependencies with --no-root (go-gitea#27919) Show correct commit sha when viewing single commit diff (go-gitea#27916) Fix 500 when deleting a dismissed review (go-gitea#27903) Remove action runners on user deletion (go-gitea#27902) Remove SSH workaround (go-gitea#27893) Remove "tabindex" from some form buttons (go-gitea#27892) Refactor the function RemoveOrgUser (go-gitea#27582) Fix DownloadFunc when migrating releases (go-gitea#27887)
We should not use `asset.ID` in DownloadFunc because DownloadFunc is a closure. https://github.com/go-gitea/gitea/blob/1bf5527eac6b947010c8faf408f6747de2a2384f/services/migrations/gitea_downloader.go#L284-L295 A similar bug when migrating from GitHub has been fixed in go-gitea#14703. This PR fixes the bug when migrating from Gitea and GitLab.
We should not use
asset.ID
in DownloadFunc because DownloadFunc is a closure.gitea/services/migrations/gitea_downloader.go
Lines 284 to 295 in 1bf5527
A similar bug when migrating from GitHub has been fixed in #14703. This PR fixes the bug when migrating from Gitea and GitLab.