Commit Graph
18 Commits
Author SHA1 Message Date
f0e15250b9 Migrate to use jsoniter instead of encoding/json (#14841)
* Migrate to use jsoniter

* fix tests

* update gitea.com/go-chi/binding

Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: 6543 <[email protected]>
2021-03-01 22:08:10 +01:00
6543andGitHub a19447aed1 migrate from com.* to alternatives (#14103)
* remove github.com/unknwon/com from models

* dont use "com.ToStr()"

* replace "com.ToStr" with "fmt.Sprint" where its easy to do

* more refactor

* fix test

* just "proxy" Copy func for now

* as per @lunny
2020-12-25 11:59:32 +02:00
Lunny XiaoandGitHub 9f100a45c6 Possible fix the webhook API creation (#13960)
* Possible fix the webhook API creation

* Fix api create webhook bug
2020-12-12 16:33:19 +01:00
6edfa6bc88 Fix broken migration on webhook (#13911)
* Fix broken migration on webhook

* Fix lint

Co-authored-by: John Olheiser <[email protected]>
2020-12-09 17:20:13 +00:00
42354dfe45 Move webhook type from int to string (#13664)
* Move webhook type from int to string

* rename webhook_services

* finish refactor

* Fix merge

* Ignore unnecessary ci

Co-authored-by: 6543 <[email protected]>
Co-authored-by: zeripath <[email protected]>
2020-12-08 11:41:14 +01:00
3f1c0841cb Granular webhook events (#9626)
* Initial work

Signed-off-by: jolheiser <[email protected]>

* Add PR reviews and API coverage

Signed-off-by: jolheiser <[email protected]>

* Split up events

Signed-off-by: jolheiser <[email protected]>

* Add migration and locale

Signed-off-by: jolheiser <[email protected]>

* Format

Signed-off-by: jolheiser <[email protected]>

* Revert IsPull

Signed-off-by: jolheiser <[email protected]>

* Fix comments

Signed-off-by: jolheiser <[email protected]>

* Fix tests

Signed-off-by: jolheiser <[email protected]>

* Fix PR reviews

Signed-off-by: jolheiser <[email protected]>

* Fix issue_comment

Signed-off-by: jolheiser <[email protected]>

* Make fmt

Signed-off-by: jolheiser <[email protected]>

* Migrations

Signed-off-by: jolheiser <[email protected]>

* Backwards compatible API

Signed-off-by: jolheiser <[email protected]>

* Fix feishu

Signed-off-by: jolheiser <[email protected]>

* Move session commit

Signed-off-by: jolheiser <[email protected]>

Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: guillep2k <[email protected]>
2020-03-06 07:10:48 +02:00
6543andLauris BH 2848c5eb8f Swagger info corrections (#9441)
* use numbers and not http.Status___ enum

* fix test

* add many missing swagger responses

* code format

* Deletion Sould return 204 ...

* error handling improvements

* if special error type ... then add it to swagger too

* one smal nit

* invalidTopicsError is []string

* valid swagger specification 2.0
 - if you add responses swagger can tell you if you do it right 👍

* use ctx.InternalServerError

* Revert "use numbers and not http.Status___ enum"

This reverts commit b1ff386e2418ed6a7f183e756b13277d701278ef.

* use http.Status* enum everywhere
2019-12-20 19:07:12 +02:00
Lunny XiaoandGitHub daab245167 Move code.gitea.io/gitea/routers/api/v1/convert to code.gitea.io/gitea/modules/convert (#8892)
* Move code.gitea.io/gitea/routers/api/v1/convert to code.gitea.io/gitea/modules/convert

* fix fmt
2019-11-10 12:41:51 +08:00
Lunny Xiaoandzeripath a966a0298e Move more webhook codes from models to webhook module (#8802)
* Move more webhook codes from models to webhook module
2019-11-03 22:13:25 +00:00
WGHandLauris BH 6ddd3b0b47 Implement webhook branch filter (#7791)
* Fix validate() function to handle errors in embedded anon structs

* Implement webhook branch filter

See #2025, #3998.
2019-09-09 08:48:21 +03:00
Tamal Sahaandtechknowlogick 171b359877 Use gitea forked macaron (#7933)
Signed-off-by: Tamal Saha <[email protected]>
2019-08-23 12:40:29 -04:00
techknowlogickandLunny Xiao 5fb1ad7011 Webhook Logs show proper HTTP Method, and allow change HTTP method in form (#6953)
* Fix #6951 - logs show proper HTTP Method, and allow change HTTP method
in form

* enforce POST method for webhook

* set default if method is empty
2019-05-15 20:01:53 +08:00
Lunny XiaoandGitHub 34eee25bd4 Move sdk structs to modules/structs (#6905)
* move sdk structs to moduels/structs

* fix tests

* fix fmt

* fix swagger

* fix vendor
2019-05-11 18:21:34 +08:00
John Olheiserandtechknowlogick cac9e6e760 Updates to API 404 responses (#6077) 2019-03-18 22:29:43 -04:00
Lanre Adelowoandtechknowlogick be48397945 Slack webhook channel name cannot be empty or just contain an hashtag (#4786) 2018-09-10 10:31:08 -04:00
Lunny XiaoandGitHub 24941a1046 Add more webhooks support and refactor webhook templates directory (#3929)
* add more webhook support

* move hooks templates to standalone dir and add more webhooks ui

* fix tests

* update vendor checksum

* add more webhook support

* move hooks templates to standalone dir and add more webhooks ui

* fix tests

* update vendor checksum

* update vendor

Signed-off-by: Bo-Yi Wu <[email protected]>

* load attributes when created release

* update comparsion doc
2018-05-16 22:01:55 +08:00
Ethan KoenigandLunny Xiao 876bafb7ef Fix API status code for hook creation (#2814)
* Fix API status code for hook creation

* Named constants for response statuses
2017-11-20 15:00:53 +08:00
Ethan KoenigandKim "BKC" Carlbäcker 9847b38518 Organization webhook API endpoints 2016-12-25 14:51:57 +01:00