Commit Graph

5 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
63221dfec3 Complete XORM to GORM migration for internal/database/repo.go
- Replace import "xorm.io/xorm" with "gorm.io/gorm"
- Replace all Engine parameters with *gorm.DB
- Replace *xorm.Session parameters with *gorm.DB
- Convert all database queries from XORM to GORM syntax:
  - e.ID(id).Get(&model) → db.First(&model, id).Error
  - e.Insert(&model) → db.Create(&model).Error
  - e.Update(&model) → db.Updates(&model).Error
  - e.In("col", values) → db.Where("col IN ?", values)
  - e.Find(&results) → db.Find(&results).Error
  - e.Iterate() → db.FindInBatches()
- Convert transaction patterns from NewSession/Begin/Commit to db.Transaction()
- Replace global x variable with db
- Convert XORM AfterSet callback to GORM AfterFind hook
- Handle gorm.ErrRecordNotFound for missing records
- Fix related files: repositories.go, repo_collaboration.go, two_factor.go

Co-authored-by: unknwon <2946214+unknwon@users.noreply.github.com>
2026-01-24 16:00:27 +00:00
ᴊᴏᴇ ᴄʜᴇɴ
560f92ec5f two_factor: verify recovery code ownership upon using (#8100) 2026-01-22 22:30:27 -05:00
Copilot
4ee706b2bf chore: replace pkg/errors with cockroachdb/errors (#8098)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: unknwon <2946214+unknwon@users.noreply.github.com>
2026-01-22 08:20:53 -05:00
ᴊᴏᴇ ᴄʜᴇɴ
59e9fa191b chore: remove all MIT license file headers (#8083)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2026-01-08 19:32:15 -05:00
Joe Chen
3650b32ec5 chore: rename internal/db to internal/database (#7665) 2024-02-18 19:39:41 -05:00