7
7
"context"
8
8
"fmt"
9
9
"net/url"
10
- "time"
11
10
12
11
"code.gitea.io/gitea/modules/git"
13
12
"code.gitea.io/gitea/modules/repository"
@@ -86,7 +85,6 @@ type HookProcReceiveRefResult struct {
86
85
func HookPreReceive (ctx context.Context , ownerName , repoName string , opts HookOptions ) ResponseExtra {
87
86
reqURL := setting .LocalURL + fmt .Sprintf ("api/internal/hook/pre-receive/%s/%s" , url .PathEscape (ownerName ), url .PathEscape (repoName ))
88
87
req := newInternalRequestAPI (ctx , reqURL , "POST" , opts )
89
- req .SetReadWriteTimeout (time .Duration (60 + len (opts .OldCommitIDs )) * time .Second )
90
88
_ , extra := requestJSONResp (req , & ResponseText {})
91
89
return extra
92
90
}
@@ -95,7 +93,6 @@ func HookPreReceive(ctx context.Context, ownerName, repoName string, opts HookOp
95
93
func HookPostReceive (ctx context.Context , ownerName , repoName string , opts HookOptions ) (* HookPostReceiveResult , ResponseExtra ) {
96
94
reqURL := setting .LocalURL + fmt .Sprintf ("api/internal/hook/post-receive/%s/%s" , url .PathEscape (ownerName ), url .PathEscape (repoName ))
97
95
req := newInternalRequestAPI (ctx , reqURL , "POST" , opts )
98
- req .SetReadWriteTimeout (time .Duration (60 + len (opts .OldCommitIDs )) * time .Second )
99
96
return requestJSONResp (req , & HookPostReceiveResult {})
100
97
}
101
98
@@ -104,7 +101,6 @@ func HookProcReceive(ctx context.Context, ownerName, repoName string, opts HookO
104
101
reqURL := setting .LocalURL + fmt .Sprintf ("api/internal/hook/proc-receive/%s/%s" , url .PathEscape (ownerName ), url .PathEscape (repoName ))
105
102
106
103
req := newInternalRequestAPI (ctx , reqURL , "POST" , opts )
107
- req .SetReadWriteTimeout (time .Duration (60 + len (opts .OldCommitIDs )) * time .Second )
108
104
return requestJSONResp (req , & HookProcReceiveResult {})
109
105
}
110
106
0 commit comments