summaryrefslogtreecommitdiffstats
path: root/models
Commit message (Collapse)AuthorAgeFilesLines
* Prevent sending emails and notifications to inactive users (#2384)David Schneiderbauer2017-09-1613-21/+85
| | | | | | | | | | | | | | | | | | | | | | * Filter inactive users before sending emails or creating browser notifications Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * fix formatting issues Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * included requested changes Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * optimized database queries * rebasing new master and add tablenames for clarification in xorm queries * remove escaped quotationmarks using backticks Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
* Fix unit test race condition (#2516)Ethan Koenig2017-09-151-2/+7
|
* Fixes 500 error on dashboard when using MSSQL (#2504)bradder5552017-09-151-1/+1
| | | | | | | | | | | | | | MSSQL rejects the query: SELECT "repository"."id" FROM "repository" INNER JOIN "team_repo" ON "team_repo".repo_id="repository".id AND "repository".is_mirror=1 WHERE ( ("repository".owner_id=2 AND "repository".is_private=0) OR team_repo.team_id IN (1) ) GROUP BY "repository".id ORDER BY updated_unix DESC when the order by term (updated_unix) is not included in the group by term.
* improve protected branch to add whitelist support (#2451)Lunny Xiao2017-09-146-80/+230
| | | | | | | | | | | | | | | | | | | | * improve protected branch to add whitelist support * fix lint * fix style check * fix tests * fix description on UI and import * fix test * bug fixed * fix tests and languages * move isSliceInt64Eq to util pkg; improve function names & typo
* Display commit status on landing page of repo (#1784)Rémy Boulanouar2017-09-141-11/+23
| | | | | | | | * Display commit status on landing page of repo * improve last status of commits and add link to ci * fix last commit status since the order of ids are desc
* Use created & updated instead BeforeInsert & BeforeUpdate (#2482)Lunny Xiao2017-09-1318-183/+48
| | | | | | | | | | | | * 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
* Add missing fixture to clean gpg_key table (#2494)Lauris BH2017-09-121-0/+1
| | | | | | * Add missing fixture to clean gpg_key table * Fix possible too fast request execution in timetracker start/stop test
* Disable custom Git Hooks globally via configuration file (#2450)techknowlogick2017-09-121-1/+1
| | | | | | | | * Create option to disable githooks globally via configuration file * Update comment in app.ini to align with @ethantkoenig's suggestion Signed-off-by: Matti Ranta <matti@mdranta.net>
* Feature: Timetracking (#2211)Jonas Franz2017-09-1219-21/+724
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Make repo private to no interfere with other tests (#2467)Antoine GIRARD2017-09-061-1/+1
|
* Only check at least one email gpg key (#2266)Antoine GIRARD2017-09-054-21/+49
| | | | | | | | | | | | | | | | | | | | | | * Only require one email (possibly not yet validated) * Update message error and check validation of commit * Add integrations tests * Complete integration for import * Add pre-check/optimization * Add some test (not finished) * Finish * Fix fixtures * Fix typo * Don't guess key ID
* Fix migration from pre-v15 to 1.2.0 (#2460)Lauris BH2017-09-051-0/+1
|
* Webhooks for repo creation/deletion (#1663)Ethan Koenig2017-09-035-25/+135
| | | | | | | | * Webhooks for repo creation/deletion * add createHookTask * Add handles for GetSlackPayload and GetDiscordPayload
* fix orgnization webhooks (#2422)Lunny Xiao2017-08-302-5/+16
| | | | | | * fix org webhooks * remove trace code
* some refactors for issue and comments (#2419)Lunny Xiao2017-08-304-14/+30
|
* fix webhook test (#2415)Lunny Xiao2017-08-291-44/+53
| | | | | | | | * fix webhook test * fix error message * fix typo
* Fix releases to be counted from database not tags (#2389)Lauris BH2017-08-281-1/+1
|
* Fix tests code to prevent some runtime errors (#2381)Morlinest2017-08-2814-149/+179
| | | | | | * Fix tests code to prevent some runtime errors * Reduce nesting
* Implementation of discord webhook (#2402)Lunny Xiao2017-08-282-8/+277
| | | | | | | | | | | | * implementation of discord webhook * fix webhooks * fix typo and unnecessary color values * fix typo * fix imports and revert changes to webhook_slack.go
* fix duplicated feed (#2370)Lunny Xiao2017-08-281-8/+1
|
* Fix "index out of range" runtime error in repo_list tests (#2376)Morlinest2017-08-281-2/+6
|
* Add UseCompatSSHURI setting (#2356)Manuel2017-08-261-0/+3
| | | | | | | | | | | | | | | | * Add UseCompatSSHURI setting Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com> (+1 squashed commits) Squashed commits: [dda2dc79] Add ForceCloneSSHURL setting Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com> * Make protocol if construct more readable Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>
* Fix missing collabrative repos (#2367)Lunny Xiao2017-08-241-24/+26
| | | | | | | | * fix missing collabrative repos * fix bug of collabrative * fix SQL quotes
* Add possibility to record branch or tag information in an issue (#780)Zsombor2017-08-241-0/+1
|
* Add more test for login links and fix a bug on action retrieve (#2361)Lunny Xiao2017-08-231-1/+1
| | | | * add more test for login links and fix a bug on action retrieve
* Fix SQL condition bug in GetFeeds(..) (#2360)Ethan Koenig2017-08-231-4/+5
|
* Add collaborative repositories to the dashboard (#2205)Bwko2017-08-233-38/+50
| | | | | | | | | | * Add collaborative repositories to the dashboard Remove some unused code from the Dashboard func * fix some bug and some refactor * fix tests
* update latest xorm version to vendor (#2353)Lunny Xiao2017-08-221-1/+1
|
* Trigger sync webhooks on UI commit (#2302)Ethan Koenig2017-08-172-47/+79
| | | | | | * Trigger sync webhooks on UI commit * Also fix UI upload/delete
* Only update needed columns when update user (#2296)Lunny Xiao2017-08-121-4/+29
| | | | | | * only update needed columns when update user * fix missing update_unix column
* fix 500 error when view an issue which's milestone deleted (#2297)Lunny Xiao2017-08-121-1/+1
|
* Convert xorm literal queries to method calls (#2253)G2017-08-042-4/+2
|
* Fix counts on issues dashboard (#2215)Ethan Koenig2017-08-035-32/+69
| | | | | | | | | | * Fix counts on issues dashboard * setupSess -> setupSession * Unit test * Load repo owners for issues
* EnableUnit() -> UnitEnabled() (#2242)Ethan Koenig2017-08-022-5/+5
|
* Replace calls to xorm UseBool with Where (#2237)G2017-08-012-9/+4
|
* Fix bare-repo bugs (#2199)Ethan Koenig2017-07-272-1/+8
| | | | | | | | * Fix bare-repo bugs * Integration tests * Unused import
* Fix issue updated_unix bug (#2204)Ethan Koenig2017-07-275-0/+73
|
* Fix unclosed session bug (#2214)Ethan Koenig2017-07-261-1/+1
|
* Fix compiling without sqlite and gcc (#2177)Lauris BH2017-07-262-18/+19
|
* Fix PR nil-dereference bug (#2195)Ethan Koenig2017-07-262-7/+91
| | | | | | * Fix PR nil-dereference bug * Revert to original error format
* Fix key usage time update if the key is used in parallel for multiple ↵Lauris BH2017-07-201-4/+9
| | | | operations (#2185)
* Remove unit types commits and settings (#2161)Lauris BH2017-07-1710-77/+114
| | | | | | | | | | * Remove unit types commits and settings * Can not limit units in administrator teams * Limit changing units only to teams with read and write access mode * Small code optimization
* Ignore invalid issue numbers in commit messages. Fixes #2022 (#2150)Lauris BH2017-07-123-5/+6
|
* Fix username rendering bug (#2122)Ethan Koenig2017-07-123-4/+34
| | | | | | | | * Fix username rendering bug * XSS integration test * Migration to unescape user full names
* Improve org error handling (#2117)Antoine GIRARD2017-07-064-7/+21
| | | | | | | | | | * Improve ErrOrgNotExist type Return new error type Use good error check Use new method to check error Update tests * Fix unchanged method name report
* Fix unchecked error bug (#2110)Ethan Koenig2017-07-041-1/+4
|
* Fix git hooks update to receive required arguments. Fixes #2090 (#2095)Lauris BH2017-07-024-6/+26
| | | * Changed migration calling so that migrations can use models package
* Fix SQL bug in models.PullRequestsEthan Koenig2017-07-011-2/+1
|
* Merge pull request #2087 from Bwko/fix_error_exitLauris BH2017-06-301-1/+1
|\ | | | | Fix exit status 1 not handled @ getMergeCommit (#2087)
| * Fix exit status 1 not handled @ getMergeCommitBwko2017-06-301-1/+1
| |