kolaente
27602491d4
Fix webhook template when validation errors occur ( #11421 )
Signed-off-by: kolaente <k@knt.li>
5 years ago
S7evinK
260b169d7e
Add Matrix webhook ( #10831 )
* Add Matrix webhook
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* Add template and related translations for Matrix hook
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* Add actual webhook routes and form
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* Add missing file
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* Update modules/webhook/matrix_test.go
* Use stricter regex to replace URLs
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* Escape url and text
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* Remove unnecessary whitespace
* Fix copy and paste mistake
Co-Authored-By: Tulir Asokan <tulir@maunium.net>
* Fix indention inconsistency
* Use Authorization header instead of url parameter
* Add raw commit information to webhook
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Tulir Asokan <tulir@maunium.net>
6 years ago
James Lakin
16f96e2abc
System-wide webhooks ( #10546 )
* Create system webhook column (and migration)
* Create system webhook DB methods
Based on the default webhook ones
* Modify router to handle system webhooks and default ones
* Remove old unused admin nav template
* Adjust orgRepoCtx to differentiate system and default webhook URLs
* Assign IsSystemWebhook when creating webhooks
* Correctly use booleans for IsSystemWebhook
* Use system webhooks when preparing webhooks for payload
* Add UI and locale changes
* Use router params to differentiate admin hook pages
* Fix deleting admin webhooks and rename method
* Add clarity to webhook docs
* Revert "Remove old unused admin nav template"
This reverts commit 191a20a738 .
* Rename WebHooksNewPost to GiteaHooksNewPost for clarity
* Reintroduce blank line lost during merge conflict
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
6 years ago
John Olheiser
ffc33714dc
Granular webhook events ( #9626 )
* Initial work
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add PR reviews and API coverage
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Split up events
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add migration and locale
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Format
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Revert IsPull
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix comments
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix tests
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix PR reviews
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix issue_comment
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Make fmt
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Migrations
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Backwards compatible API
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix feishu
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Move session commit
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
6 years ago
James Lakin
6db96039c4
Fix redirection path if Slack webhook channel is invalid ( #10548 )
The path to the hook config is already defined by orgRepoCtx
Co-authored-by: Lauris BH <lauris@nix.lv>
6 years ago
Lunny Xiao
a1d35421d5
Add feishu webhook support ( #10229 )
Add feishu webhook support
6 years ago
SpaWn2KiLl
539bd27f9f
API add/generalize pagination ( #9452 )
* paginate results
* fixed deadlock
* prevented breaking change
* updated swagger
* go fmt
* fixed find topic
* go mod tidy
* go mod vendor with go1.13.5
* fixed repo find topics
* fixed unit test
* added Limit method to Engine struct; use engine variable when provided; fixed gitignore
* use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors
* set Page value on Home route
* improved memory allocations
* fixed response headers
* removed logfiles
* fixed import order
* import order
* improved swagger
* added function to get models.ListOptions from context
* removed pagesize diff on unit test
* fixed imports
* removed unnecessary struct field
* fixed go fmt
* scoped PR
* code improvements
* code improvements
* go mod tidy
* fixed import order
* fixed commit statuses session
* fixed files headers
* fixed headers; added pagination for notifications
* go mod tidy
* go fmt
* removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list
* Apply suggestions from code review
Co-Authored-By: 6543 <6543@obermui.de>
Co-Authored-By: zeripath <art27@cantab.net>
* fixed build error
* CI.restart()
* fixed merge conflicts resolve
* fixed conflicts resolve
* improved FindTrackedTimesOptions.ToOptions() method
* added backwards compatibility on ListReleases request; fixed issue tracked time ToSession
* fixed build error; fixed swagger template
* fixed swagger template
* fixed ListReleases backwards compatibility
* added page to user search route
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
6 years ago
Lunny Xiao
ccfd918a9a
Move more webhook codes from models to webhook module ( #8802 )
* Move more webhook codes from models to webhook module
6 years ago
Lunny Xiao
33914aee50
Rename HookQueue to hookQueue ( #8778 )
* Rename HookQueue to hookQueue
* fix lint
6 years ago
Lunny Xiao
a01023f251
Move webhook to a standalone package under modules ( #8747 )
* Move webhook to a standalone package under modules
* fix test
* fix comments
6 years ago
Aam Surganda
8e832a7d97
Change general form binding to gogs form ( #8334 )
6 years ago
WGH
016de7972b
Implement webhook branch filter ( #7791 )
* Fix validate() function to handle errors in embedded anon structs
* Implement webhook branch filter
See #2025 , #3998 .
6 years ago
Tamal Saha
033fe113c1
Use gitea forked macaron ( #7933 )
Signed-off-by: Tamal Saha <tamal@appscode.com>
6 years ago
kolaente
cdba91b438
Add golangci ( #6418 )
6 years ago
techknowlogick
4a8443d3d2
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
6 years ago
Lunny Xiao
45d0e05e14
Move sdk structs to modules/structs ( #6905 )
* move sdk structs to moduels/structs
* fix tests
* fix fmt
* fix swagger
* fix vendor
7 years ago
Simon
9f82390a7f
Add GET requests to webhook ( #6771 )
* Add GET requests to webhook
* make fmt
* Handle invalid http method on webhook
* Uppercase http method in webhook
* Rename v85.go to v86.go
* make fmt
7 years ago
Daniel Grier
cb44e25d56
Add support for MS Teams webhooks ( #6632 )
7 years ago
techknowlogick
b9839dfe6e
Telegram webhook ( #4227 )
7 years ago
Lunny Xiao
f47714c501
move code.gitea.io/git to code.gitea.io/gitea/modules/git ( #6364 )
* move code.gitea.io/git to code.gitea.io/gitea/modules/git
* fix imports
* fix fmt
* fix misspell
* remove wrong tests data
* fix unit tests
* fix tests
* fix tests
* fix tests
* fix tests
* fix tests
* enable Debug to trace the failure tests
* fix tests
* fix tests
* fix tests
* fix tests
* fix tests
* comment commit count tests since git clone depth is 50
* fix tests
* update from code.gitea.io/git
* revert change to makefile
7 years ago
Russell Aunger
de4be7a2c2
Implement Default Webhooks ( #4299 )
Partially implement #770 .
Add "Default Webhooks" page in site admin UI.
Persist to the existing webhooks table, but store with RepoID=0 and OrgID=0.
Upon repo creation, copy the set of default webhooks into the new repo.
7 years ago
Lanre Adelowo
ac3d4c717b
Slack webhook channel name cannot be empty or just contain an hashtag ( #4786 )
7 years ago
Russell Aunger
5128ce487b
Fix webhook type conflation. ( #4285 )
- Fix typo that caused Gogs hooks to be created as Gitea hooks.
- Fix typo that caused Gogs hooks to be duplicated upon edit (though this bug was masked by the previous one).
Signed-off-by: Russell Aunger <rba@live.com>
7 years ago
Lunny Xiao
ab3544eeff
fix bugs caused by #3929 ( #3999 )
7 years ago
Lunny Xiao
a619bd08b0
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 <appleboy.tw@gmail.com>
* load attributes when created release
* update comparsion doc
8 years ago
Morgan Bazalgette
8c916631f0
Handle refactor ( #3339 )
* Replace all ctx.Handle with ctx.ServerError or ctx.NotFound
* Change Handle(403) to NotFound, avoid using macaron's NotFound
8 years ago
Elouan Martinet
16448c0ca1
Fix guide link for webhooks in repository settings ( #3291 ) ( #3292 )
Signed-off-by: Elouan Martinet <exa@elou.world>
8 years ago
Lunny Xiao
e4c0c3bbd0
Add dingtalk webhook ( #2777 )
* add dingtalk webhook type
* add vendor
* some fixes
* fix name check
* fix name check & improvment
8 years ago
David Schneiderbauer
75bb4887b6
fix panic on gogs webhook creation ( #2675 )
* fix panic on gogs webhook creation
Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
* fix panic in gogs webhook edit
Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
8 years ago
Ethan Koenig
e4e41c4830
Webhooks for repo creation/deletion ( #1663 )
* Webhooks for repo creation/deletion
* add createHookTask
* Add handles for GetSlackPayload and GetDiscordPayload
8 years ago
Lunny Xiao
4a6aedf41c
fix webhook test ( #2415 )
* fix webhook test
* fix error message
* fix typo
8 years ago
Lunny Xiao
5539562312
fix missing orgnization discord webhook ( #2414 )
8 years ago
Lunny Xiao
3d63ae00ae
Implementation of discord webhook ( #2402 )
* implementation of discord webhook
* fix webhooks
* fix typo and unnecessary color values
* fix typo
* fix imports and revert changes to webhook_slack.go
8 years ago
Rémy Boulanouar
971024dd63
Add Gitea Webhook ( #1755 )
* Replace Gogs by Gitea
* Fix missing changes
* Create Gitea webhook and put Gogs webhook apart.
8 years ago
Lunny Xiao
301dcd4876
update code.gitea.io/git ( #450 )
9 years ago
Ethan Koenig
2872b66e89
Bug fixes for repo permissions in API
Also move duplicated code into repo.APIFormat(..)
9 years ago
Bwko
fcde7de425
Fixes typos
9 years ago
Lunny Xiao
e134836804
golint fixed for routers ( #208 )
9 years ago
Sandro Santilli
827c85ad85
Fix import path of go-sdk ( #141 )
From code.gitea.io/go-sdk/gitea
To code.gitea.io/sdk/gitea
9 years ago
Sandro Santilli
cb1b3cc148
Update import paths from github.com/go-gitea to code.gitea.io ( #135 )
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis
See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
9 years ago
Sandro Santilli
f5ceddc42d
Fix type in unused constant name ( #111 )
* Write LDAP, SMTP, PAM, DLDAP back to all uppercase
* Fix type in unused constant name
* Other MixCased fixes
* Complete MixerCasing of template constants
* Re uppercase LTS and LDAPS suffixes
* Uppercase JSON suffix in constant names
* Proper case LoginNoType
* Prefix unexported template path constants with "tpl"
9 years ago
Sandro Santilli
0daccd049a
And others
9 years ago
Sandro Santilli
d092b29641
More MixedCase consts
9 years ago
Sandro Santilli
8212aa70ba
Use MixedCase constant names
See https://github.com/golang/go/wiki/CodeReviewComments#mixed-caps
9 years ago
Thomas Boerger
a2f2fa9326
Replaced go-gogs-client with go-sdk imports
9 years ago
Thomas Boerger
54a9e8c1c4
Fixed links to sdk docs
9 years ago
Sandro Santilli
3c9693defb
Replace gogits/git-module dependency with go-gitea/git ( #94 )
* Replace gogits/git-module dependency with go-gitea/git
Fixes #92
* Remove git alias for git module import (not needed)
9 years ago
Rémy Boulanouar
9712d5ee89
Change import reference to match gitea instead of gogs ( #37 )
9 years ago
Unknwon
38c02e6ece
#2246 add HTMLURL to webhook type
- Fill Milestone and Assignee field when available in webhook payload
9 years ago
Unknwon
559cbcdc6f
Fix empty repository panic on send test webhook
9 years ago