Jump to conversation
Unresolved conversations (1)
@wxiaoguang wxiaoguang Feb 10, 2022
Why `LocalKeyID: issue.ID` here, other code uses `IssueIndex` for `LocalKeyID`
Outdated
models/issue.go
realaravinth
Aravinth Manivannan
Resolved conversations (15)
@Gusted Gusted Feb 15, 2022
```suggestion Type string `xorm:"VARCHAR(16) INDEX UNIQUE(repo_foreign_type)"` ``` Current struct in `foreignreference.go` also uses 16.
Outdated
models/migrations/v210.go
realaravinth
Aravinth Manivannan
@KN4CK3R KN4CK3R Feb 14, 2022
This and the errors may be better placed in `/models/federation` or similiar. The goal is to make `/models` cleaner.
Outdated
models/foreignreference.go
realaravinth
Aravinth Manivannan
@lunny lunny Feb 13, 2022
Is 8 enough? In fact, we can enumerate them now. `issue`, `pull_request`, `comment`, `review`, `review_comemnt`, `release`. Maybe 16 is better?
Outdated
models/foreignreference.go
realaravinth
Aravinth Manivannan
@lunny lunny Feb 11, 2022
It's inconsistent with above code. See https://github.com/go-gitea/gitea/pull/18446/files#r804317877
Outdated
models/migrate.go
realaravinth
Aravinth Manivannan
@lunny lunny Feb 11, 2022
So `LocalID` is pointing to issue's `ID` or issue's `Index`?
Outdated
models/issue.go
@lunny lunny Feb 11, 2022
comment is necessary
Outdated
models/foreignreference.go
realaravinth
Aravinth Manivannan
@lunny lunny Feb 10, 2022
Just left the first year is OK.
Outdated
services/migrations/gitea_uploader.go
realaravinth
Aravinth Manivannan
@wxiaoguang wxiaoguang Feb 7, 2022
The `ForeignID` is string in database, but in code, it's `int64`, I think the type should be consistent.
Outdated
models/foreignreference.go
realaravinth
Aravinth Manivannan
@wxiaoguang wxiaoguang Feb 7, 2022
If the `LocalID` is the `issue index`, it's better to be called `LocalIssueIndex`, we should avoid introducing ambiguous concepts as much as possible.
Outdated
models/foreignreference.go
wxiaoguang
wxiaoguang
@wxiaoguang wxiaoguang Feb 7, 2022
If I understand correctly, we only have one type: "issue" now? Should we use a constant for the `Type`?
Outdated
models/foreignreference.go
realaravinth lunny
Aravinth Manivannan and Lunny Xiao
@wxiaoguang wxiaoguang Feb 7, 2022
As above.
Outdated
modules/migration/review.go
@wxiaoguang wxiaoguang Feb 7, 2022
The meaning of `ID` is quite confusing. In Gitea, `ID` means the primary key of a model, for example, IssueID is `issue`.`id` The `number` of an issue is called `index` in Gitea. Should we clarify these concepts? `GetLocalIssueIndex` is more clear if I understand correctly.
Outdated
modules/migration/comment.go
@wxiaoguang wxiaoguang Feb 7, 2022
I have a feeling that we should put the code to a correct place, instead of using this big banner 😂
Outdated
models/error.go
@Gusted Gusted Jan 30, 2022
File name? Should be v210.go
Outdated
models/migrations/v1000.go
realaravinth
Aravinth Manivannan
@Gusted Gusted Jan 30, 2022
```suggestion // v209 -> v210 ```
Outdated
models/migrations/migrations.go