Commit Graph

20 Commits (1ebb30e41bf3b44404d7d03a5541729762c226b5)

Author SHA1 Message Date
Gusted 6c0fe1f3ec
refactor httplib ()
- Remove a lot of unused code(most if not all were introduced in gogs
for webhooks usages).

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Eng Zer Jun f2e7d5477f
refactor: move from io/ioutil to io and os package ()
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Lunny Xiao 9f31f3aa8a
Add an abstract json layout to make it's easier to change json library ()
* Add an abstract json layout to make it's easier to change json library

* Fix import

* Fix import sequence

* Fix blank lines

* Fix blank lines
zeripath 3dcb3e9073
Second attempt at preventing zombies ()
* Second attempt at preventing zombies

* Ensure that the pipes are closed in ssh.go
* Ensure that a cancellable context is passed up in cmd/* http requests
* Make cmd.fail return properly so defers are obeyed
* Ensure that something is sent to stdout in case of blocks here

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint 2

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint 3

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fixup

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Apply suggestions from code review

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Lunny Xiao 3d5bb3e6a3
fix webhook timeout bug ()
* Also fix the potential problem in httplib
zeripath f0e15250b9
Migrate to use jsoniter instead of encoding/json ()
* Migrate to use jsoniter

* fix tests

* update gitea.com/go-chi/binding

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
kolaente f9ec2f89f2 Add golangci ()
Antoine GIRARD b3fd94c13d Add sensitive headers ()
* Add HeaderWithSensitiveCase methods to respect casing

* Update webhook.go
Sandro Santilli 00d08473b8 Use GiteaServer as the user agent for http requests ()
Otherwise we're still presenting ourselves as GogsServer...
Lunny Xiao 2eeae84cbd Add internal routes for ssh hook comands ()
* add internal routes for ssh hook comands

* fix lint

* add comment on why package named private not internal but the route name is internal

* add comment above package private why package named private not internal but the route name is internal

* remove exp time on internal access

* move routes from /internal to /api/internal

* add comment and defer on UpdatePublicKeyUpdated
Ethan Koenig 021904e4e6 Fix typos in models/ and modules/ ()
Schwobaland 2f7dc28b22 add ProxyFromEnvironment if none set ()
Lunny Xiao bd5ea3e222 Golint fixed for modules/httplib
Unknwon de3be370f7 Remove unused tests
Module httplib will be replaced a well done third-party package
soon, so remove its unused tests
Unknwon b9f5def5dc fix insecure tls when trigger task
Unknwon 23f42d92c9 add webhook recent deliveries
Unknwon ce8d4cc80b
Unknwon 97a373f5e7 Fix , update code with upstream
Unknwon 9a1d5d2489 Finish new web hook pages
Unknown e573855a4f Fix , support web hook