Skip to content

Commit 4579e49

Browse files
committed
Fix lint
1 parent 2461ad0 commit 4579e49

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

routers/common/compare.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ func (cr *CompareInfo) IsSameRef() bool {
109109
}
110110

111111
// display pull related information or not
112-
func (ci *CompareInfo) IsPull() bool {
113-
return ci.CaretTimes == 0 && !ci.DirectComparison() &&
114-
ci.BaseFullRef.IsBranch() && (ci.HeadRepo == nil || ci.HeadFullRef.IsBranch())
112+
func (cr *CompareInfo) IsPull() bool {
113+
return cr.CaretTimes == 0 && !cr.DirectComparison() &&
114+
cr.BaseFullRef.IsBranch() && (cr.HeadRepo == nil || cr.HeadFullRef.IsBranch())
115115
}
116116

117-
func (ci *CompareInfo) Close() {
118-
if ci.close != nil {
119-
ci.close()
117+
func (cr *CompareInfo) Close() {
118+
if cr.close != nil {
119+
cr.close()
120120
}
121121
}
122122

@@ -309,15 +309,15 @@ func ParseComparePathParams(ctx context.Context, pathParam string, baseRepo *rep
309309
return ci, nil
310310
}
311311

312-
func (ci *CompareInfo) LoadRootRepoAndOwnForkRepo(ctx context.Context, baseRepo *repo_model.Repository, doer *user_model.User) (*repo_model.Repository, *repo_model.Repository, error) {
312+
func (cr *CompareInfo) LoadRootRepoAndOwnForkRepo(ctx context.Context, baseRepo *repo_model.Repository, doer *user_model.User) (*repo_model.Repository, *repo_model.Repository, error) {
313313
// find root repo
314314
var rootRepo *repo_model.Repository
315315
var err error
316316
if !baseRepo.IsFork {
317317
rootRepo = baseRepo
318318
} else {
319-
if !ci.HeadRepo.IsFork {
320-
rootRepo = ci.HeadRepo
319+
if !cr.HeadRepo.IsFork {
320+
rootRepo = cr.HeadRepo
321321
} else {
322322
rootRepo, err = getRootRepo(ctx, baseRepo)
323323
if err != nil {
@@ -328,7 +328,7 @@ func (ci *CompareInfo) LoadRootRepoAndOwnForkRepo(ctx context.Context, baseRepo
328328

329329
// find ownfork repo
330330
var ownForkRepo *repo_model.Repository
331-
if doer != nil && ci.HeadRepo.OwnerID != doer.ID && baseRepo.OwnerID != doer.ID {
331+
if doer != nil && cr.HeadRepo.OwnerID != doer.ID && baseRepo.OwnerID != doer.ID {
332332
ownForkRepo, err = findHeadRepo(ctx, baseRepo, doer.ID)
333333
if err != nil {
334334
return nil, nil, err

0 commit comments

Comments
 (0)