aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo.go
Commit message (Collapse)AuthorAgeFilesLines
* Add commit count caching (#2774)Lauris BH2017-10-261-0/+11
| | | | | | | | | | * 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
* Use buffersize to reduce database connection when iterate (#2724)Lunny Xiao2017-10-211-2/+2
| | | | | | | | * use buffersize to reduce database connection when iterate * fix typo * add default value on app.ini comment
* Create new branch from branch selection dropdown (#2130)Lauris BH2017-10-151-35/+0
| | | | | | | | | | * Create new branch from branch selection dropdown and rewrite it to VueJS * Make updateLocalCopyToCommit as not exported * Move branch name validation to model * Fix possible race condition
* 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-151-1/+18
| | | | | | | | | | | | | | * 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
* 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-141-2/+2
| | | | | | | | | | * remove orgnization watch repositories * fix migration * fix typo and missing change * remove unused code
* Replace deprecated Id method with ID (#2655)Ethan Koenig2017-10-051-6/+6
|
* Remove repo unit index (#2621)Morlinest2017-10-021-3/+1
| | | | | | * Remove repo unit index * Fix sqlite
* Use AfterLoad instead of AfterSet on Structs (#2628)Lunny Xiao2017-10-011-19/+12
| | | | | | | | * use AfterLoad instead of AfterSet on Structs * fix the comments on AfterLoad * fix the comments on action AfterLoad
* Reduce usage of allcols on update (#2596)Lunny Xiao2017-09-251-1/+1
| | | | | | * reduce usage of allcols on update * fix bug and tests
* Sync releases table with tags on push and for mirrors (#2459)Lauris BH2017-09-201-0/+4
| | | | | | | | | | | | | | | * 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
* 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
* Restructure markup & markdown to prepare for multiple markup language… (#2411)Lunny Xiao2017-09-161-5/+5
| | | | | | | | | | * restructure markup & markdown to prepare for multiple markup languages support * adjust some functions between markdown and markup * fix tests * improve the comments
* improve protected branch to add whitelist support (#2451)Lunny Xiao2017-09-141-0/+36
| | | | | | | | | | | | | | | | | | | | * 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
* Use created & updated instead BeforeInsert & BeforeUpdate (#2482)Lunny Xiao2017-09-131-13/+2
| | | | | | | | | | | | * 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
* Feature: Timetracking (#2211)Jonas Franz2017-09-121-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Webhooks for repo creation/deletion (#1663)Ethan Koenig2017-09-031-11/+31
| | | | | | | | * Webhooks for repo creation/deletion * add createHookTask * Add handles for GetSlackPayload and GetDiscordPayload
* Fix releases to be counted from database not tags (#2389)Lauris BH2017-08-281-1/+1
|
* 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>
* EnableUnit() -> UnitEnabled() (#2242)Ethan Koenig2017-08-021-3/+3
|
* Remove unit types commits and settings (#2161)Lauris BH2017-07-171-0/+4
| | | | | | | | | | * 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
* Fix git hooks update to receive required arguments. Fixes #2090 (#2095)Lauris BH2017-07-021-3/+7
| | | * Changed migration calling so that migrations can use models package
* Refactor session close as xorm already does everything needed internally (#2020)Lauris BH2017-06-211-6/+6
|
* fix bu ong normal user visit public repo (#1984)Lunny Xiao2017-06-171-1/+1
|
* fix collborators lack of units on orgnization repositories (#1968)Lunny Xiao2017-06-151-0/+7
| | | | | | * fix collborators lack of units on orgnization repositories * also change log level to debug
* Fix errors caused by force push (#1927)Ethan Koenig2017-06-101-6/+7
|
* Make `LocalCopyPath` a setting instead of a hard-coded path (#1881)Phil Hopper2017-06-061-1/+4
|
* Fix status table race condition (#1835)Ethan Koenig2017-05-311-6/+3
|
* Update code.gitea.io/git (#1824)Ethan Koenig2017-05-301-1/+4
| | | | | | | | * Update code.gitea.io/git * Update function calls * govendor fetch
* Fix deadlock in updateRepository (#1813)Ethan Koenig2017-05-261-4/+8
|
* Delete repo redirects on repo deletion (#1776)Ethan Koenig2017-05-231-0/+1
|
* Fix unloaded owner (#1770)Ethan Koenig2017-05-211-2/+3
|
* fix admin lost permission caused by #947Lunny Xiao2017-05-191-6/+6
|
* Add units to team (#947)Lunny Xiao2017-05-181-2/+56
| | | | | | | | | | | | | | | | | | * add units to team * fix lint * finish team setting backend * finished permission controll on routes * fix import blank line * add unit check on ssh/http pull and push and fix test failed * fix fixtures data * remove unused code
* gofmt (#1710)Ethan Koenig2017-05-121-1/+1
|
* Added Parent property to the repo API (#1687)guyzmo2017-05-121-0/+16
| | | Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
* Exposes in API the Repo entity's Size and IsBare property (#1668)guyzmo2017-05-051-0/+2
| | | | | | | | | | * Exposes in API the Repo entity's IsBare property as IsEmpty Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net> * Exposes in API the Repo entity's Size property Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
* Sanitation fix from Gogs (#1461)Kim "BKC" Carlbäcker2017-04-131-3/+3
| | | | | | | | | | | | | | | | * Santiation fix from Gogs * Linting * Fix build-errors * still not working * Fix all the things! * gofmt * Add code-injection checks
* Repo size in admin panel (#1482)Jonas2017-04-111-0/+25
| | | | | | | | | | | | | | | * 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
* Mirror sync interval specified as duration string (#1407)Jonas2017-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Sync interval specifed as duration string * Changed mirror interval text * make fmt * Add MinInterval for mirror sync * Use duration internally * Changed min default to 10m * make fmt * Incorrect default * Removed defaults in MustDuration() * Add Mirror interval migration * Default values corrected * Use transaction during migration * Change http 500 to page with error message * Cleanup session.commit()
* rewrite pre-commit, post-commit and options hooks (fixes #1250) (#1257)Philippe Kueck2017-03-231-6/+7
| | | | | | | | | | | | | | * issue #1250, replace {pre,post}-receive and update hooks with a single shell script that does not require custom hooks to be a sh-script * issue #1250, make script posix compilant * v23, add migration script to update {pre,post}-receive and update hooks * migration: use a more common name and rename v23 to v26 to avoid conflicts * gofmt'ed and added copyright header * fix SyncRepositoryHooks to also sync wiki repos
* feat: Only use issue and wiki on repo. (#1297)Bo-Yi Wu2017-03-181-1/+1
|
* Refactor and fix incorrect comment (#1247)Ethan Koenig2017-03-151-1/+1
|
* bug fixed for delete repo failed (#1193)Lunny Xiao2017-03-101-1/+1
|
* feat: expose url field on issue api. (#982)Bo-Yi Wu2017-03-031-0/+5
| | | | | | | | | | | | | | * Add api url func. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * fix: Add unit testing. * fix: conflicts * fix: remove trim * fix: revert test function name.
* fix wrong num of user repos because of duplicated click delete button & ↵Lunny Xiao2017-03-011-20/+28
| | | | performance optimization (#1092)
* Fix unused Engine bugs (#1064)Ethan Koenig2017-02-271-3/+3
|
* move all repo list functions as a standalone file (#1061)Lunny Xiao2017-02-271-259/+0
|
* fix: Admin can see all private repositories on Explore page. (#1026)Bo-Yi Wu2017-02-261-16/+32
| | | | | | * fix: Admin can see all private repositories on Explore page. * refactor: fix session