Commit Graph

99 Commits (c9f819eae0ac9cdce82e25abe25c067b1927e923)

Author SHA1 Message Date
Lauris BH 7eacdcf39a Fix webhooks to use proxy from environment ()
WGH 6ddd3b0b47 Implement webhook branch filter ()
* Fix validate() function to handle errors in embedded anon structs

* Implement webhook branch filter

See , .
Tamal Saha 171b359877 Use gitea forked macaron ()
Signed-off-by: Tamal Saha <tamal@appscode.com>
Lunny Xiao 85202d4784
Display ui time with customize time location ()
* display ui time with customize time location

* fix lint

* rename UILocation to DefaultUILocation

* move time related functions to modules/timeutil

* fix tests

* fix tests

* fix build

* fix swagger
Antoine GIRARD e9bb75d8d1 Fix duplicate call of webhook ()
kolaente f9ec2f89f2 Add golangci ()
Lunny Xiao 1f84970de0
Make webhook http connections resuable ()
* make http connections resuable

* add error handler

* fix lint
techknowlogick 5fb1ad7011 Webhook Logs show proper HTTP Method, and allow change HTTP method in form ()
* Fix  - logs show proper HTTP Method, and allow change HTTP method
in form

* enforce POST method for webhook

* set default if method is empty
Lunny Xiao 34eee25bd4
Move sdk structs to modules/structs ()
* move sdk structs to moduels/structs

* fix tests

* fix fmt

* fix swagger

* fix vendor
Simon a2a006a5d5 Add GET requests to webhook ()
* 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
Daniel Grier b9d1fb6de3 Add support for MS Teams webhooks ()
techknowlogick 56da256853
Telegram webhook ()
zeripath 704da08fdc
Better logging () ()
* Panic don't fatal on create new logger

Fixes 

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

* partial broken

* Update the logging infrastrcture

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

* Reset the skip levels for Fatal and Error

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

* broken ncsa

* More log.Error fixes

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

* Remove nal

* set log-levels to lowercase

* Make console_test test all levels

* switch to lowercased levels

* OK now working

* Fix vetting issues

* Fix lint

* Fix tests

* change default logging to match current gitea

* Improve log testing

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

* reset error skip levels to 0

* Update documentation and access logger configuration

* Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE

* Fix broken level caching

* Refactor the router log

* Add Router logger

* Add colorizing options

* Adjust router colors

* Only create logger if they will be used

* update app.ini.sample

* rename Attribute ColorAttribute

* Change from white to green for function

* Set fatal/error levels

* Restore initial trace logger

* Fix Trace arguments in modules/auth/auth.go

* Properly handle XORMLogger

* Improve admin/config page

* fix fmt

* Add auto-compression of old logs

* Update error log levels

* Remove the unnecessary skip argument from Error, Fatal and Critical

* Add stacktrace support

* Fix tests

* Remove x/sync from vendors?

* Add stderr option to console logger

* Use filepath.ToSlash to protect against Windows in tests

* Remove prefixed underscores from names in colors.go

* Remove not implemented database logger

This was removed from Gogs on 4 Mar 2016 but left in the configuration
since then.

* Ensure that log paths are relative to ROOT_PATH

* use path.Join

* rename jsonConfig to logConfig

* Rename "config" to "jsonConfig" to make it clearer

* Requested changes

* Requested changes: XormLogger

* Try to color the windows terminal

If successful default to colorizing the console logs

* fixup

* Colorize initially too

* update vendor

* Colorize logs on default and remove if this is not a colorizing logger

* Fix documentation

* fix test

* Use go-isatty to detect if on windows we are on msys or cygwin

* Fix spelling mistake

* Add missing vendors

* More changes

* Rationalise the ANSI writer protection

* Adjust colors on advice from @0x5c

* Make Flags a comma separated list

* Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING

* Ensure matching is done on the non-colored message - to simpify EXPRESSION
techknowlogick 22d3d029e6
Add signatures to webhooks ()
Russell Aunger b34996a629 Implement Default Webhooks ()
Partially implement .
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.
Lanre Adelowo 945804f800 Webhook for Pull Request approval/rejection ()
Lunny Xiao 4ec8551490
fix webhook bug of response info is not displayed in UI ()
Lunny Xiao 24941a1046
Add more webhooks support and refactor webhook templates directory ()
* 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
Antoine GIRARD b3fd94c13d Add sensitive headers ()
* Add HeaderWithSensitiveCase methods to respect casing

* Update webhook.go
Ethan Koenig 3968c1149e Fix SQL type error for webhooks ()
Lunny Xiao f2e20c81b6 Refactor struct's time to remove unnecessary memory usage ()
* refactor struct's time to remove unnecessary memory usage

* use AsTimePtr simple code

* fix tests

* fix time compare

* fix template on gpg

* use AddDuration instead of Add
Lunny Xiao 10b54df2b2 Add dingtalk webhook ()
* add dingtalk webhook type

* add vendor

* some fixes

* fix name check

* fix name check & improvment
Ethan Koenig aa962deec0 Replace deprecated Id method with ID ()
Lunny Xiao a8717e5e3a Use AfterLoad instead of AfterSet on Structs ()
* use AfterLoad instead of AfterSet on Structs

* fix the comments on AfterLoad

* fix the comments on action AfterLoad
Lunny Xiao 005900baea Use created & updated instead BeforeInsert & BeforeUpdate ()
* use created & updated instead BeforeInsert & BeforeUpdate

* fix vendor checksum

* only show generated SQL when development mode

* remove extra update column updated_unix

* remove trace config
Ethan Koenig b689bb6180 Webhooks for repo creation/deletion ()
* Webhooks for repo creation/deletion

* add createHookTask

* Add handles for GetSlackPayload and GetDiscordPayload
Lunny Xiao 04ec79579c fix orgnization webhooks ()
* fix org webhooks

* remove trace code
Lunny Xiao 3e6fed368b fix webhook test ()
* fix webhook test

* fix error message

* fix typo
Lunny Xiao ced50e0ec1 Implementation of discord webhook ()
* implementation of discord webhook

* fix webhooks

* fix typo and unnecessary color values

* fix typo

* fix imports and revert changes to webhook_slack.go
Lauris BH 6db387a21e Refactor session close as xorm already does everything needed internally ()
Rémy Boulanouar e0c6ab2d44 Add Gitea Webhook ()
* Replace Gogs by Gitea

* Fix missing changes

* Create Gitea webhook and put Gogs webhook apart.
Lunny Xiao 36f02c0c32
fix potential sqlite lock
Ethan Koenig 021904e4e6 Fix typos in models/ and modules/ ()
Anton Skorokhod 79ab69fe30 Add X-GitHub-* headers for webhook to get clubhouse.io integration working ()
Ethan Koenig 0934d1b1ea Bug fixes and unit tests for models/webhook ()
Ethan Koenig 27fcf8d30a Bug fixes for webhook API ()
Andrey Nering 84b7d29d34 Create missing database indexes ()
Alexander Lunegov d5d21b67d2 Fix string format verbs ()
Sandro Santilli c25063d834 Lint webhook.go, unexports simpleMarshalJSON ()
Sandro Santilli a1c5f02444 Fix import path of go-sdk ()
From code.gitea.io/go-sdk/gitea
  To code.gitea.io/sdk/gitea
Thibault Meyer b0ddced2b5
Merge remote-tracking branch 'upstream/master' into feature/rewrite-xorm-queries
# Conflicts:
#	models/git_diff.go
#	models/issue.go
#	models/org.go
#	models/pull.go
#	models/repo.go
Thibault Meyer a4454f5d0f
Rewrite XORM queries
Sandro Santilli 4247304f5a Update import paths from github.com/go-gitea to code.gitea.io ()
- 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
Sandro Santilli 864d1b1f9f Fix type in unused constant name ()
* 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"
Sandro Santilli aadd7dcdc3 And others
Sandro Santilli 0b62aeb495 More MixedCase consts
Sandro Santilli 80eea77953 Use MixedCase constant names
See https://github.com/golang/go/wiki/CodeReviewComments#mixed-caps
Thomas Boerger 4c6c16f358
Replaced go-gogs-client with go-sdk imports
Thomas Boerger 648c6fdd60
Vet complains about "should have signature MarshalJSON() ([]byte, error)", replaced with custom name
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs ()