Skip to content

Commit 7b778a3

Browse files
authored
Merge branch 'main' into rm-hugo
2 parents 56becda + 22a84a7 commit 7b778a3

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

modules/lfstransfer/backend/util.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ func newInternalRequestLFS(ctx context.Context, internalURL, method string, head
132132
return nil
133133
}
134134
req := private.NewInternalRequest(ctx, internalURL, method)
135+
req.SetReadWriteTimeout(0)
135136
for k, v := range headers {
136137
req.Header(k, v)
137138
}

services/context/private.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,35 @@ func init() {
2828
})
2929
}
3030

31-
// Deadline is part of the interface for context.Context and we pass this to the request context
3231
func (ctx *PrivateContext) Deadline() (deadline time.Time, ok bool) {
3332
if ctx.Override != nil {
3433
return ctx.Override.Deadline()
3534
}
3635
return ctx.Base.Deadline()
3736
}
3837

39-
// Done is part of the interface for context.Context and we pass this to the request context
4038
func (ctx *PrivateContext) Done() <-chan struct{} {
4139
if ctx.Override != nil {
4240
return ctx.Override.Done()
4341
}
4442
return ctx.Base.Done()
4543
}
4644

47-
// Err is part of the interface for context.Context and we pass this to the request context
4845
func (ctx *PrivateContext) Err() error {
4946
if ctx.Override != nil {
5047
return ctx.Override.Err()
5148
}
5249
return ctx.Base.Err()
5350
}
5451

55-
var privateContextKey any = "default_private_context"
52+
type privateContextKeyType struct{}
53+
54+
var privateContextKey privateContextKeyType
5655

57-
// GetPrivateContext returns a context for Private routes
5856
func GetPrivateContext(req *http.Request) *PrivateContext {
5957
return req.Context().Value(privateContextKey).(*PrivateContext)
6058
}
6159

62-
// PrivateContexter returns apicontext as middleware
6360
func PrivateContexter() func(http.Handler) http.Handler {
6461
return func(next http.Handler) http.Handler {
6562
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {

services/gitdiff/gitdiff.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,7 @@ func SyncUserSpecificDiff(ctx context.Context, userID int64, pull *issues_model.
13561356
// But as that does not work for all potential errors, we simply mark all files as unchanged and drop the error which always works, even if not as good as possible
13571357
if err != nil {
13581358
log.Error("Could not get changed files between %s and %s for pull request %d in repo with path %s. Assuming no changes. Error: %w", review.CommitSHA, latestCommit, pull.Index, gitRepo.Path, err)
1359+
err = nil //nolint
13591360
}
13601361

13611362
filesChangedSinceLastDiff := make(map[string]pull_model.ViewedState)
@@ -1397,7 +1398,7 @@ outer:
13971398
}
13981399
}
13991400

1400-
return review, err
1401+
return review, nil
14011402
}
14021403

14031404
// CommentAsDiff returns c.Patch as *Diff

0 commit comments

Comments
 (0)