summaryrefslogtreecommitdiffstats
path: root/models/update.go
Commit message (Collapse)AuthorAgeFilesLines
* Move PushUpdateAddDeleteTags to repository module from models (#10106)Lunny Xiao2020-02-031-153/+5
| | | | | | * Move PushUpdateAddDeleteTags to repository module from models * Fix deadlock on sqlite
* Move push commits from models to modules/repository (#9370)Lunny Xiao2020-01-101-88/+10
| | | | | | | | | | | | | | | | * Move push commits from models to modules/repository * fix test * fix test * fix test * fix test * fix test Co-authored-by: zeripath <art27@cantab.net>
* Properly enforce gitea environment for pushes (#9501)zeripath2019-12-271-0/+1
| | | #8982 attempted to enforce the gitea environment for pushes - unfortunately it tested the settings before they were actually read in - and therefore does not do that!
* Fix SetExpr failed (#9506)Lunny Xiao2019-12-271-4/+4
|
* Batch hook pre- and post-receive calls (#8602)zeripath2019-12-261-0/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * make notifyWatchers work on multiple actions * more efficient multiple notifyWatchers * Make CommitRepoAction take advantage of multiple actions * Batch post and pre-receive results * Set batch to 30 * Auto adjust timeout & add logging * adjust processing message * Add some messages to pre-receive * Make any non-200 status code from pre-receive an error * Add missing hookPrintResults * Remove shortcut for single action * mistaken merge fix * oops * Move master branch to the front * If repo was empty and the master branch is pushed ensure that that is set as the default branch * fixup * fixup * Missed HookOptions in setdefaultbranch * Batch PushUpdateAddTag and PushUpdateDelTag Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Move PushUpdateOptions from models to repofiles (#9124)Lunny Xiao2019-11-291-11/+0
|
* Allow Protected Branches to Whitelist Deploy Keys (#8483)zeripath2019-10-211-0/+2
| | | | | | | | | | | | | | | Add an option to protected branches to add writing deploy keys to the whitelist for pushing. Please note this is technically a breaking change: previously if the owner of a repository was on the whitelist then any writing deploy key was effectively on the whitelist. This option will now need to be set if that is desired. Closes #8472 Details: * Allow Protected Branches to Whitelist Deploy Keys * Add migration * Ensure that IsDeployKey is set to false on the http pushes * add not null default false
* Display ui time with customize time location (#7792)Lunny Xiao2019-08-151-3/+3
| | | | | | | | | | | | | | | | | | * 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
* Move models.PushUpdate to repofiles.PushUpdate (#7485)Lunny Xiao2019-07-241-115/+4
| | | | | | * move models.PushUpdate to repofiles.PushUpdate * remove duplicated code to load repo
* Monitor all git commands; move blame to git package and replace git as a ↵Lunny Xiao2019-06-261-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variable (#6864) * monitor all git commands; move blame to git package and replace git as a variable * use git command but not other commands * fix build * move exec.Command to git.NewCommand * fix fmt * remove unrelated changes * remove unrelated changes * refactor IsEmpty and add tests * fix tests * fix tests * fix tests * fix tests * remove gitLogger * fix fmt * fix isEmpty * fix lint * fix tests
* Add golangci (#6418)kolaente2019-06-121-2/+2
|
* Move PushUpdate dependency from models to repofiles (#6763)Lunny Xiao2019-06-101-4/+0
| | | | | | * remove push_update * move models.PushUpdate to repofiles.PushUpdate
* Better logging (#6038) (#6095)zeripath2019-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Panic don't fatal on create new logger Fixes #5854 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
* move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)Lunny Xiao2019-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Improve performance of dashboard (#4977)Lunny Xiao2018-12-131-1/+1
|
* env var GITEA_PUSHER_EMAIL (#4516)Lukas Treyer2018-07-261-0/+1
| | | | | | * env var GITEA_PUSHER_EMAIL * set pusher email only if email address is not private
* Refactor struct's time to remove unnecessary memory usage (#3142)Lunny Xiao2017-12-111-4/+3
| | | | | | | | | | | | | | * 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
* Code/repo search (#2582)Ethan Koenig2017-10-271-0/+4
| | | Indexed search of repository contents (for default branch only)
* Add checks for commits with missing author and time (#2771)Lauris BH2017-10-261-6/+22
| | | | | | * Add checks for commits with missing author and time * Fix validate commits with emails if it has no Author
* Add commit count caching (#2774)Lauris BH2017-10-261-3/+10
| | | | | | | | | | * Add commit count caching * Small refactoring * Add different key prefix for refs and commits * Add configuratuion option to allow to change caching time or disable it
* Replace deprecated Id method with ID (#2655)Ethan Koenig2017-10-051-3/+3
|
* Complete push webhooks (#2530)David Schneiderbauer2017-09-211-44/+33
| | | | | | | | | | | | | | | | | * implemented missing 'delete' push webhooks moreover created ActionDeleteBranch and ActionDeleteTag * add CommitRepoAction tests for tag/branch creation/deletion * fixed error where push webhook not called if is new branch or tag removed unnecessary code * moved prepare unit test environment into separate method to be used across unit tests * add missing if clause in pushUpdate Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
* Sync releases table with tags on push and for mirrors (#2459)Lauris BH2017-09-201-5/+100
| | | | | | | | | | | | | | | * Sync releases table with tags on push and for mirrors * Code style fixes * Fix api to return only releases * Optimize release creation and update Minimize posibility of race conditions * Fix release lower tag name updating * handle tag reference update by addionally comparing commit id
* Trigger sync webhooks on UI commit (#2302)Ethan Koenig2017-08-171-1/+18
| | | | | | * Trigger sync webhooks on UI commit * Also fix UI upload/delete
* Remove env user salt since no need to use (#1515)Lunny Xiao2017-05-061-1/+0
| | | | | | * remove env user salt since no need to use * remove unused variable from update.go
* Drop db operations from hook commands (#1514)Lunny Xiao2017-05-041-21/+21
| | | | | | | | | | * move all database operations from hook command to web command and instead of internal routes * bug fixed * adjust the import path sequences * remove unused return value on hookSetup
* Repo size in admin panel (#1482)Jonas2017-04-111-0/+4
| | | | | | | | | | | | | | | * Implementation of the feature to view repository size in admin panel * Move GetRepoSize to git module * Repository.RepoSize -> Repository.Size * RepoSize -> Size in template * Redo a few bits and pieces * Update size when syncing mirror or forking * Remove GetRepoSize * Changed fatal errors to error message * Copy migration code from Gogs * make fmt
* Move push update to post-receive and protected branch check to pre-receive ↵Lunny Xiao2017-02-251-34/+9
| | | | | | | | | | | | (#1030) * move all push update to git hook post-receive and protected branch check to git hook pre-receive * add SSH_ORIGINAL_COMMAND check back * remove all unused codes * fix the import
* Cleanup log messagingGabriel Jackson2017-02-021-1/+1
| | | | | | | | | This change corrects a few logging issues: * Standardized formatting errors with '%v'. * Standardized failure warning word usage. * Corrected an instance of using the standard log library when the gitea log library should be used instead.
* update code.gitea.io/git (#450)Lunny Xiao2016-12-221-4/+4
|
* Fix string format verbs (#3637)Alexander Lunegov2016-12-221-1/+1
|
* Fixed linting errors for variable definitionsThomas Boerger2016-11-291-1/+1
|
* Lint models/update.go & webhook_slack.goBwko2016-11-251-0/+5
|
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-2/+2
| | | | | | | - 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
* Replace gogits/git-module dependency with go-gitea/git (#94)Sandro Santilli2016-11-061-1/+1
| | | | | | | | * Replace gogits/git-module dependency with go-gitea/git Fixes #92 * Remove git alias for git module import (not needed)
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-1/+1
|
* General code quality improvementUnknwon2016-08-161-34/+29
|
* Code clean up for new config optionsUnknwon2016-08-141-10/+14
|
* Add committer information to API and Webhooks. Also fixes #3271 (#3414)lstahlman2016-08-091-5/+7
|
* #2907 Add commit timestamp to webhookUnknwon2016-08-091-4/+6
|
* Refactor User.Id to User.IDUnknwon2016-07-241-3/+3
|
* #2650 fix possbility that use email as pusher user nameUnknwon2016-02-171-40/+50
| | | | | | | | | | Remove the possibility of using email as user name when user actually push through combination of email and password with HTTP. Also refactor update action function to replcae tons of arguments with single PushUpdateOptions struct. And define the user who pushes code as pusher, therefore variable names shouldn't be confusing any more.
* rename import pathUnknwon2015-12-151-1/+1
|
* fix bool check for repo max limit and fix hang when push repo with tons of ↵Unknwon2015-12-101-2/+2
| | | | commits
* move out git module and #1573 send push hookUnknwon2015-12-091-19/+22
|
* Show custom avatars in commitsUnknwon2015-11-131-5/+4
|
* #1900 last updatede time not update after pushUnknwon2015-11-051-15/+15
|
* #1896 fatal when no needed update taskUnknwon2015-11-041-1/+2
|
* rename fieldsUnknwon2015-11-031-1/+1
|
* New push to head repo of head branch: regenerate patch and retest applyUnknwon2015-10-241-11/+12
|