summaryrefslogtreecommitdiffstats
path: root/models
Commit message (Collapse)AuthorAgeFilesLines
* Store OAuth2 session data in database (#3660)Lauris BH2018-04-291-2/+5
| | | | | | * Store OAuth2 session data in database * Rename table to `oauth2_session` and do not skip xormstorage initialization error
* Shows total tracked time in issue and milestone list (#3341)Jonas Franz2018-04-298-16/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Show total tracked time in issue and milestone list Show total tracked time at issue page Signed-off-by: Jonas Franz <info@jonasfranz.software> * Optimizing TotalTimes by using SumInt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fixing wrong total times for milestones caused by a missing JOIN Adding unit tests for total times Signed-off-by: Jonas Franz <info@jonasfranz.software> * Logging error instead of ignoring it Signed-off-by: Jonas Franz <info@jonasfranz.software> * Correcting spelling mistakes Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change error message to a short version Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add error handling to TotalTimes Add variable for totalTimes Signed-off-by: Jonas Franz <info@jonasfranz.de> * Introduce TotalTrackedTimes as variable of issue Load TotalTrackedTimes by loading attributes of IssueList Load TotalTrackedTimes by loading attributes of single issue Add Sec2Time as helper to use it in templates Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fixed test + gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Load TotalTrackedTimes via MilestoneList instead of single requests Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add documentation for MilestoneList Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add documentation for MilestoneList Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix test Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change comment from SQL query to description Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit test by using int64 instead of int Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit test by using int64 instead of int Signed-off-by: Jonas Franz <info@jonasfranz.software> * Check if timetracker is enabled Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix test by enabling timetracking Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Fix only updated_unix when adding a comment (#3855)kolaente2018-04-291-1/+1
|
* Don't force due date to current time (#3830)Morgan Bazalgette2018-04-231-5/+0
| | | Fixes #3827
* Add topic support (#3711)Lunny Xiao2018-04-115-0/+274
| | | | | | | | | | | | | | | | | | | | | | | | * add topic models and unit tests * fix comments * fix comment * add the UI to show or add topics for a repo * show topics on repositories list * fix test * don't show manage topics link when no permission * use green basic as topic label * fix topic label color * remove trace content * remove debug function
* Fix typo in deleteUser (#3781)Michael Kuhn2018-04-101-1/+1
| | | num_watches was used where num_stars should have been used.
* Add EnableTimetracking option to app settings (#3719)Bwko2018-04-091-0/+10
|
* Enhance healthcheck for database connectivity (#3754)Evan Sherwood2018-04-041-1/+4
| | | | | | | | Modify the call to ping the database to fail gracefully if the database has not yet been configured by the end user, such as after a clean install. This allows /healthcheck to return a 200 with a modified status message instead of causing a PANIC. Signed-off-by: Evan Sherwood <evan@sherwood.io>
* Add Size column to attachment (#3734)Jonas Franz2018-03-313-22/+56
| | | | | | | | | | | | | | | * Add size column to attachment Migrate attachments by calculating file sizes Signed-off-by: Jonas Franz <info@jonasfranz.software> * Calculate attachment size on creation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Log error instead of returning error Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add config option to enable or disable log executed SQL (#3726)Lunny Xiao2018-03-301-1/+1
| | | | | | * add config option to enable or disable log executed SQL * rename ShowSQL to LogSQL
* fix go vet error (#3740)Lunny Xiao2018-03-301-8/+8
|
* Add repository setting to enable/disable health checks (#3607)Allen Wild2018-03-273-2/+27
| | | | | | | | | | | | | | New Feature: * Repository struct field for IsFsckEnabled (default true of course) * Admin Settings section on repo options page, accessible only by admin users Possible Enhancements: * There's no way to force running health checks on all repos regardless of their IsFsckEnabled setting. This would be useful if there were an admin API or dashboard button to run fsck immediately. Issue: https://github.com/go-gitea/gitea/issues/1712 Signed-off-by: Allen Wild <allenwild93@gmail.com>
* Set default branchname on first push (#3715)Bwko2018-03-251-1/+5
|
* Add protected branch whitelists for merging (#3689)Chri-s2018-03-254-36/+149
| | | | | | | | * Add database migrations for merge whitelist * Add merge whitelist settings for protected branches * Add checks for merge whitelists
* Improve release page UI (#3693)Jonas Franz2018-03-191-0/+11
| | | | | | | | | | * Improve release page ui by adding size Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add documentation to a.MustSize() Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Global code search support (#3664)Lunny Xiao2018-03-162-0/+31
| | | | | | | | | | | | * add global code search on explore * fix bug when no anyone public repos * change the icon * fix typo and add UnitTypeCode check for login non-admin user * fix ui description when no match
* Added checks for protected branches in pull requests (#3544)Chri-s2018-03-132-0/+44
| | | | | | | | | | | | | | | | | | * Added checks for protected branches in pull requests Signed-off-by: Christian Wulff <NChris@posteo.net> * Moved check for protected branch into new function CheckUserAllowedToMerge Signed-off-by: Christian Wulff <NChris@posteo.net> * Removed merge conflict lines from last commit Signed-off-by: Christian Wulff <NChris@posteo.net> * Explicit check for error type in ViewIssue Signed-off-by: Christian Wulff <NChris@posteo.net>
* Add label descriptions (#3662)Lauris BH2018-03-133-5/+38
| | | | | | * Add label descriptions * Add default descriptions to label template
* Fix MySQL and PostgreSQL column drop SQL (#3649)Lauris BH2018-03-091-1/+1
|
* Fix column removal in MSSQL (#3638)Lauris BH2018-03-072-21/+61
| | | | | | | | * Fix column removal in MSSQL * Use xorm session in MSSQL drop column operations * Add transaction as MSSQL alter table is transactional
* Add Attachment API (#3478)Jonas Franz2018-03-063-3/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
* Don't write to log NoCommitterAccount (#3621)Morgan Bazalgette2018-03-041-1/+5
| | | | | | | | | | | * Don't write to log NoCommitterAccount It's way too verbose, and the information is also printed to the user already. Fixes #3602. * ignore err only if it's a ErrUserNotExist * Replace with IsErrUserNotExist
* fix: Add feed for organization (#3594)Bo-Yi Wu2018-03-032-0/+16
| | | | | | | | | | | | * feat: Add feed for organization * fix: testing * fix: testing * fix: testing * fix: testing
* Add admin dashboard option to run health checks (#3606)Allen Wild2018-03-021-0/+2
| | | | | There's one for git gc, why not git fsck too? Also add a couple more trace logs to GitFsck to see progress
* Fix the protected branch panic issue (#3567)Wendell Sun2018-02-231-0/+4
|
* Fix remove team member issue (#3566)Wendell Sun2018-02-232-9/+27
| | | | | Put sess.Commit() out of the RemoveOrgUser function Add an empty line to separate import packages
* Fix query protected branch bug (#3563)Wendell Sun2018-02-221-2/+1
| | | Signed-off-by: Wendell Sun <iwendellsun@gmail.com>
* fix: if Mirrors repo no content is fetched, updated time should not b… (#3551)Bo-Yi Wu2018-02-221-1/+15
| | | | | | | | | | | | * fix: if Mirrors repo no content is fetched, updated time should not be changed * fix: sync update time from mirror repo. * fix: one single session. * update comment. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* refactor: reduce sql query in retrieveFeeds (#3547)Bo-Yi Wu2018-02-212-1/+108
|
* Use unique temp dirs in unit tests (#3494)Ethan Koenig2018-02-211-8/+25
| | | | | | | | * Use unique temp dirs in unit tests * Remove temp dirs after tests run * os.RemoveAll -> removeAllWithRetry
* Bug fix for repo releases sorted (#3522)Wendell Sun2018-02-211-1/+3
| | | | | Signed-off-by: Wendell Sun <iwendellsun@gmail.com> Use TimeStampNow function
* Add issue closed time column to fix activity closed issues list (#3537)Lauris BH2018-02-195-5/+49
| | | Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>
* Force remove test repo root path in case previous test is still locking it ↵Lauris BH2018-02-181-1/+14
| | | | | | (#3528) Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>
* Implements generator cli for secrets (#3531)Codruț Constantin Gușoi2018-02-183-6/+7
| | | Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
* Update code.gitea.io/git (#3482)Ethan Koenig2018-02-102-41/+23
|
* Fixes missing avatars in offline mode (#3471)Codruț Constantin Gușoi2018-02-081-1/+3
| | | Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
* Reduce repo indexer disk usage (#3452)Ethan Koenig2018-02-052-8/+12
|
* Fix rendering of wiki page list if wiki repo contains other files (#3454)Lauris BH2018-02-053-2/+20
| | | | | | * Fix rendering of wiki page list if wiki repo contains other files * Improve wiki filename tests
* Fix synchronization bug in repo indexer (#3455)Ethan Koenig2018-02-051-62/+100
|
* Enable caching on assets and avatars (#3376)Morgan Bazalgette2018-02-041-1/+1
| | | | | | | | | | | | | | * Enable caching on assets and avatars Fixes #3323 * Only set avatar in user BeforeUpdate when there is no avatar set * add error checking after stat * gofmt * Change cache time for avatars to an hour
* Add sensitive headers (#3429)Antoine GIRARD2018-01-311-2/+2
| | | | | | | * Add HeaderWithSensitiveCase methods to respect casing * Update webhook.go
* Fix PR merge error (#3421)Ethan Koenig2018-01-291-5/+1
|
* Fix SQL type error for webhooks (#3424)Ethan Koenig2018-01-291-3/+10
|
* Fix race condition in repo renaming (#3418)Ethan Koenig2018-01-281-1/+6
|
* Fix empty checkout bug (#3419)Ethan Koenig2018-01-281-6/+6
|
* Change local copy origin url after repository rename (#3399)Wendell Sun2018-01-271-1/+10
| | | Fix #3378
* Fix SSH auth lfs locks (#3152)Antoine GIRARD2018-01-272-34/+40
| | | | | | | | | | * Fix SSH auth LFS locks * Activate SSH/lock test * Remove debug * Follow @lunny recommendation for AfterLoad method
* Remove useless check (#3384)Antoine GIRARD2018-01-191-4/+0
| | | In #3377, I put check inside all write key function. This one is useless no.
* Force-push to base repo's ref/pull/#/head (#3393)Sandro Santilli2018-01-191-0/+1
| | | | | | | | | | | * Force-push to base repo's ref/pull/#/head Fixes force-pushing to pull request branches, otherwise failing with: [...gitea/models/pull.go:1022 AddTestPullRequestTask()] [E] PushToBaseRepo: Push: exit status 1 - To /path/to/gitea-repositories/org/repo.git ! [rejected] issue-fix -> refs/pull/20/head (non-fast-forward) * format
* Change how merged PR commit info are prepared (#3368)Lauris BH2018-01-191-3/+8
| | | | | | | | | | * Change how merged PR commits and diff are made * Update code.gitea.io/git dependency * Fix typo * Remove unneeded local variable