summaryrefslogtreecommitdiffstats
path: root/models
Commit message (Collapse)AuthorAgeFilesLines
* Fix so that user can still fork his own repository to owned organizations ↵Lauris BH2017-10-151-0/+19
| | | | | | | | | | (#2699) * Fix so that user can still fork his own repository to his organizations * Fix to only use owned organizations * Add integration test for forking own repository to owned organization
* Add Activity page to repository (#2674)Lauris BH2017-10-152-1/+260
| | | | | | | | | | | | | | * Add Activity page to repository * Add request data for activity * Add issue data for activity * Add user unit right checks * Add releases to activity * Log repository unit loading error
* Fix organization watch migration (#2703)Lauris BH2017-10-141-1/+1
|
* Allow custom SSH user in UI for built-in SSH server (#2617) (#2678)Patrick G2017-10-141-3/+8
| | | | | | | | | | | | | | | | | * Allow custom SSH user in UI for built-in SSH server (#2617) * Some fixes * Did make fmt * Updated according to review - Renamed config to BUILTIN_SSH_SERVER_USER - Removed unnecessary default string value for config item * Updated according to review * Fixed some minor issues
* Fix orgnization user watch repository (#2670)Lunny Xiao2017-10-143-2/+40
| | | | | | | | | | * remove orgnization watch repositories * fix migration * fix typo and missing change * remove unused code
* Remove redudant functions and code (#2652)Morlinest2017-10-103-82/+34
| | | * Remove redudant functions and code
* Add repository search unit and integration tests (#2575)Morlinest2017-10-101-6/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add more repo search tests * Fix repo search tests * Always test returned repos length * Add test with lower pagesize limit (test more pages) * Add and fix /api/repo/search integration tests * Simplify unit tests code * Simplify and unify integration tests code * Improve test coverage * Temporary fix tests due to bugs in current repo search implementation * Revert removing not nil Searcher * Add more checks to tests * Simplify privacy checks in /api/repo tests * Temporary remove privacy check from repo search tests
* Rewrite migrations to not depend on future code changes (#2604)David Schneiderbauer2017-10-085-63/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * v38 migration used an outdated version of RepoUnit model (#2602) * change repoUnit model in migration * fix v16 migration repo_unit table * fix lint error * move type definition inside function Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * fix lint error Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * Fix time tracking migration * Refactor code * Fix migration from Gogs * v38 migration used an outdated version of RepoUnit model (#2602) * change repoUnit model in migration * fix v16 migration repo_unit table * fix lint error * move type definition inside function Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * fix lint error Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * Fix time tracking migration * Refactor code * Fix migration from Gogs * add error check Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * Additiomal fixes for migrations * Fix timetracking migration * Add back nil check
* GPG key email verification no longer case sensitive (#2661) (#2663)Julian Scholle2017-10-061-1/+2
| | | | | | | * GPG key email verification no longer case sensitive (#2661) * case insensitive GPG key email verification now cached (#2661) Signed-off-by: Julian Scholle <julian.scholle@googlemail.com>
* table `pull_request` wasn't updated correctly (#2649)Kazuki Sawada2017-10-061-1/+1
| | | | | | * Fix: table `pull_request` won't be updated correctly * Update also status column when manually merged
* Replace deprecated Id method with ID (#2655)Ethan Koenig2017-10-0531-84/+84
|
* Fix index column deletion (#2651)Morlinest2017-10-041-1/+1
|
* Use session when creating user (#2638)Ethan Koenig2017-10-031-16/+20
|
* Remove repo unit index (#2621)Morlinest2017-10-025-16/+33
| | | | | | * Remove repo unit index * Fix sqlite
* Use AfterLoad instead of AfterSet on Structs (#2628)Lunny Xiao2017-10-0122-273/+153
| | | | | | | | * use AfterLoad instead of AfterSet on Structs * fix the comments on AfterLoad * fix the comments on action AfterLoad
* Fix implementation of repo Home func (#2601)Morlinest2017-10-012-12/+20
| | | | | | * Fix implementation of repo Home func * Make fixture changes for testing
* Fix doubled issue tab introduced in migration v16 (#2611)David Schneiderbauer2017-09-282-0/+71
| | | | | * fix duplicate issue tab as UnitTypeIssue and UnitTypeExternalTracker are existing at the same time Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
* Remove redudant issue LoadAttributes() calls (#2614)Morlinest2017-09-271-6/+1
|
* Reduce usage of allcols on update (#2596)Lunny Xiao2017-09-2510-25/+21
| | | | | | * reduce usage of allcols on update * fix bug and tests
* Make indexer code more reusable (#2590)Ethan Koenig2017-09-251-14/+23
|
* Fix broken migration to add can_push field back to table (#2574)Lauris BH2017-09-231-2/+10
|
* Use custom type and constants to hold order by options (#2572)Morlinest2017-09-221-13/+32
|
* Expand fixtures (#2571)Morlinest2017-09-228-1/+204
| | | | | | | | | | * Add more repo search tests * Add and fix /api/repo/search integration tests * Add owner to access table for organization repositories * Remove tests
* Complete push webhooks (#2530)David Schneiderbauer2017-09-214-101/+187
| | | | | | | | | | | | | | | | | * 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>
* Add init support of orgmode document type on file view and readme (#2525)Lunny Xiao2017-09-211-1/+1
| | | | | | | | | | | | | | * add init support of orgmode document type on file view and readme * fix imports * fix imports and readmeExist * fix imports order * fix format * remove unnecessary convert
* Fix sending mail with a non-latin display name. #2102 (#2559)Rémi Saurel2017-09-211-1/+1
| | | | | | | | | | * Fix sending mail with a non-latin display name. #2102 Signed-off-by: Rémi Saurel <contact@remi-saurel.com> * Take into account the possibility that setting.MailService.From is in `name <email@address>` format. #2102 Signed-off-by: Rémi Saurel <contact@remi-saurel.com>
* Fix can_push value to false in protected_branch (#2560)Lauris BH2017-09-203-0/+21
|
* Sync releases table with tags on push and for mirrors (#2459)Lauris BH2017-09-206-19/+248
| | | | | | | | | | | | | | | * 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
* Use named ActionType constants in template helper (#2545)Ethan Koenig2017-09-201-3/+2
|
* Fix lint errors (#2547)Ethan Koenig2017-09-197-33/+7
|
* Fork permission bug fixes (#2534)Jonas Franz2017-09-181-1/+1
| | | | | | | | | | | | | | | | * Hotfix for "Add time manually" (https://github.com/go-gitea/gitea/pull/2211#issuecomment-328780125) Signed-off-by: Jonas Franz <info@jonasfranz.software> * Checking if Code unit is enabled before creating a fork. Signed-off-by: Jonas Franz <info@jonasfranz.software> * Adding a discrete function for RepoIDAssignment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Improved Documentation
* Improve issue search (#2387)Ethan Koenig2017-09-165-145/+84
| | | | | | | | | | * Improve issue indexer * Fix new issue sqlite bug * Different test indexer paths for each db * Add integration indexer paths to make clean
* Restructure markup & markdown to prepare for multiple markup language… (#2411)Lunny Xiao2017-09-166-18/+19
| | | | | | | | | | * restructure markup & markdown to prepare for multiple markup languages support * adjust some functions between markdown and markup * fix tests * improve the comments
* 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
|