summaryrefslogtreecommitdiffstats
path: root/models
Commit message (Collapse)AuthorAgeFilesLines
* fix forgot removed records when deleting user (#5429)Lunny Xiao2018-12-184-16/+53
| | | | | | | | | | * fix forgot removed records when deleting user * fix migration * fix rewritekey lock on sqlite * remove unused codes
* Add base repo nil check (#5555)Jonas Franz2018-12-171-0/+9
| | | Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Improve performance of dashboard (#4977)Lunny Xiao2018-12-1313-65/+288
|
* Added test environment for mssql (#4282)kolaente2018-12-121-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added test environment for m$sql * Added template for test environment for m$sql * Fix password * Fix password (again) * Fix password (again again) * Fix db * Ci trigger (Looking at you drone....) * Ci trigger (Looking at you drone....) * Ci trigger (Looking at you drone....) * Ci trigger (Looking at you drone....) * Create master database for mssql integration tests Signed-off-by: Jonas Franz <info@jonasfranz.software> * Create database only if master do not exist Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix mssql integration tests by using custom database "gitea" Signed-off-by: Jonas Franz <info@jonasfranz.software> * Moved defer * bump xorm * updated xorm * Fixed build
* fix approvals limitation (#5521)Lunny Xiao2018-12-111-1/+2
|
* Approvals at Branch Protection (#5350)Jonas Franz2018-12-117-30/+156
| | | | | | | | | | | | | | | | | | | | | | * Add branch protection for approvals Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add required approvals Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing comments and fmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add type = approval and group by reviewer_id to review * Prevent users from adding negative review limits * Add migration for approval whitelists Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fixing MSSQL timestamp type (#5511)Christopher2018-12-111-1/+1
| | | | | | MSSQL is using the wrong type here which results in a strconv.ParseInt: parsing "2018-12-07T00:00:00Z": invalid syntax error. The added datediff(SECOND, '19700101', x) results in the unix timestamp to be returned. Signed-off-by: Christopher Dziomba <christopher.dziomba@gmail.com>
* fix code review on mssql (#5502)Lunny Xiao2018-12-111-7/+19
|
* fix forgot deletion of notification when delete repository (#5506)Lunny Xiao2018-12-101-0/+1
|
* fix topic name length on database (#5493)Lunny Xiao2018-12-082-2/+2
|
* ensure that the `closed_at` is set for closed (#5449)romankl2018-12-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | right now the `closed_at` field for json responses is not filled during the `APIIssue` creation for api responses. For a closed issue you get a result like: ```json "state":"open","comments":0,"created_at":"2018-11-29T16:39:24+01:00", "updated_at":"2018-11-30T10:49:19+01:00","closed_at":null, "due_date":null,"pull_request":null} ``` which has no information about the closing date. (which exists in the db and ui) with this PR the result changes to this: ```json :null,"assignee":null,"assignees":null, "state":"closed", "comments":0,"created_at":"2018-11-29T16:43:05+01:00", "updated_at":"2018-12-02T19:17:05+01:00", "closed_at":"2018-12-02T19:17:05+01:00", "due_date":null,"pull_request":null} ``` fixes: https://github.com/go-gitea/gitea/issues/5446 Signed-off-by: Roman <romaaan.git@gmail.com>
* Fix repository deletion when there is large number of issues in it (#5426)Lunny Xiao2018-11-301-39/+40
|
* Milestone issues and pull requests (#5293)Lunny Xiao2018-11-292-3/+21
| | | | | | | | | | | | * add milestone issues and pulls page instead of redirecting issues page * add milestone when creating issue from milestone page * refactor to merge similiar codes as a new function issues * remove milestone info on milestone issues list * fix missing params
* Restrict permission check on repositories and fix some problems (#5314)Lunny Xiao2018-11-2827-205/+795
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix units permission problems * fix some bugs and merge LoadUnits to repoAssignment * refactor permission struct and add some copyright heads * remove unused codes * fix routes units check * improve permission check * add unit tests for permission * fix typo * fix tests * fix some routes * fix api permission check * improve permission check * fix some permission check * fix tests * fix tests * improve some permission check * fix some permission check * refactor AccessLevel * fix bug * fix tests * fix tests * fix tests * fix AccessLevel * rename CanAccess * fix tests * fix comment * fix bug * add missing unit for test repos * fix bug * rename some functions * fix routes check
* show only opened milestones on issues page milestone filter (#5051)Lanre Adelowo2018-11-261-3/+3
| | | | | | | | | | | | | | * show only opened milestones on issues page milestone filter * update Godoc * update Godoc everywhere * update swagger * use false instead of 0 * Add seccond ordering by ID for milestones where no deadline is set
* Show review summary in pull requests (#5132)kolaente2018-11-223-1/+104
|
* dont' send assign webhooks when creating issue (#5365)Lunny Xiao2018-11-201-4/+5
|
* Migration fixes for gogs (0.11.66) to gitea (1.6.0) #5318 (#5341)Florian Eitel2018-11-182-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * Remove field from migration to support upgrades from older version That will ensure the field does not get queried in the Select if it does not exist yet: ``` [I] [SQL] SELECT "id", "repo_id", "index", "poster_id", "name", "content", "milestone_id", "priority", "assignee_id", "is_closed", "is_pull", "num_comments", "ref", "deadline_unix", "created_unix", "updated_unix [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: pq: column "ref" does not exist ``` see #5318 * Skip remove stale watcher migration if not required Otherwise the migration will fail if executed from a older database version without multiple IssueWatch feature. ``` 2018/11/11 23:51:14 [I] [SQL] SELECT DISTINCT "issue_watch"."user_id", "issue"."repo_id" FROM "issue_watch" INNER JOIN issue ON issue_watch.issue_id = issue.id WHERE (issue_watch.is_watching = $1) LIMIT 50 []int [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: pq: relation "issue_watch" does not exist ``` see #5318
* Fix create team, update team missing units (#5188)Lunny Xiao2018-11-102-0/+43
|
* fix bug when users have serval teams with different units on different ↵Lunny Xiao2018-11-092-1/+11
| | | | repositories (#5307)
* Add option to disable automatic mirror syncing. (#5242)Jonas Bröms2018-11-081-1/+6
| | | Setting the interval to 0 will disable to automatic syncing.
* Prometheus endpoint (#5256)Stanislav2018-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add prometheus collector and route * dep ensure -add github.com/prometheus/client_golang/prometheus * dep ensure -update github.com/golang/protobuf * add metrics to reserved usernames * add comment head in metrics package * fix style imports * add metrics settings * add bearer token check * mapping metrics configs * fix lint * update config cheat sheet * update conf sample, typo fix
* Fixed heatmap not working in mssql (#5248)kolaente2018-11-011-2/+4
|
* Create AuthorizedKeysCommand (#5236)zeripath2018-11-011-1/+1
|
* Keys API changes (#4960)zeripath2018-10-311-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add private information to the deploy keys api This commit adds more information to the deploy keys to allow for back reference in to the main keys list. It also adds information about the repository that the key is referring to. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add private information to the user keys API This adjusts the keys API to give out private information to user keys if the current user is the owner or an admin. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add ability to search keys by fingerprint This commit adds the functionality to search ssh-keys by fingerprint of the ssh-key. Deploy keys per repository can also be searched. There is no current clear API point to allow search of all deploy keys by fingerprint or keyID. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add integration test
* fix compatibility heatmap with mysql 8 (#5232)Stanislav2018-10-311-1/+1
|
* Fix issue where ecdsa and other key types are not synced from LDAP (#5092) ↵Jerry Jacobs2018-10-301-1/+3
| | | | | | | | | | (#5094) * Fix issue where ecdsa and other key types are not synced from LDAP authentication provider fixes #5092 * integrations/auth_ldap_test.go: Add Hermes Conrad new ecdsa-sha2-nistp256 publickey fingerprint * integrations/auth_ldap_test.go: Use ssh-keygen -lf <filename> -E sha256
* This commit will reduce join star, repo_topic, topic tables on repo search, ↵Lunny Xiao2018-10-302-37/+17
| | | | | | | | so that fix extra columns problem on mssql (#5136) * This commit will reduce join star, repo_topic, topic tables on repo search, so that fix extra columns problem on mssql * fix tests
* fix data race on migrate repository (#5224)Lunny Xiao2018-10-301-3/+8
|
* fix sqlite lock (#5210)Lunny Xiao2018-10-301-1/+1
|
* fix sqlite and mssql lock (#5214)Lunny Xiao2018-10-291-12/+22
|
* fix sqlite lock (#5184)Lunny Xiao2018-10-273-5/+17
| | | | | | | | | | | | * fix sqlite lock * fix bug Co-Authored-By: lunny <xiaolunwen@gmail.com> * fix bug Co-Authored-By: lunny <xiaolunwen@gmail.com>
* Fix race on updatesize (#5190)Lunny Xiao2018-10-262-9/+10
| | | | | | * fix race on updatesize * fix more repoPath
* Fix sqlite lock (#5176)Lunny Xiao2018-10-253-5/+13
| | | | | | * fix sqlite lock * fix sqlite lock on getUnitType
* Fix JSON result of empty array (#5154)Antoine GIRARD2018-10-242-21/+41
|
* User action heatmap (#5131)kolaente2018-10-234-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added basic heatmap data * Added extra case for sqlite * Built basic heatmap into user profile * Get contribution data from api & styling * Fixed lint & added extra group by statements for all database types * generated swagger spec * generated swagger spec * generated swagger spec * fixed swagger spec * fmt * Added tests * Added setting to enable/disable user heatmap * Added locale for loading text * Removed UseTiDB * Updated librejs & moment.js * Fixed import order * Fixed heatmap in postgresql * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-Authored-By: kolaente <konrad@kola-entertainments.de> * Added copyright header * Fixed a bug to show the heatmap for the actual user instead of the currently logged in * Added integration test for heatmaps * Added a heatmap on the dashboard * Fixed timestamp parsing * Hide heatmap on mobile * optimized postgresql group by query * Improved sqlite group by statement
* Increase the retry limit to 20 times and the interval to 200ms (#5134)Mura Li2018-10-211-2/+9
| | | | The original settings has less tolerance and would fail on some environments.
* Fix SQL quoting (#5117)Filip Navara2018-10-201-1/+1
| | | | | `show` is keyword in MySQL and has to be quoted to reference a column name. Use grave accents (ASCII code 96) for quoting to match rest of the source code. It's non-standard SQL, but it's supported by SQLite and MySQL. Signed-off-by: Filip Navara <navara@emclient.com>
* Remove check for negative length (#5120)Oleg Kovalov2018-10-203-4/+4
|
* Retry test-fixtures loading in case of transaction rollback (#5125)Mura Li2018-10-201-1/+10
|
* Use named const instead of a raw string (#5115)Oleg Kovalov2018-10-201-1/+1
|
* Remove duplicated if bodies (#5121)Oleg Kovalov2018-10-191-12/+5
|
* Fix deadlock when sqlite (#5118)Lunny Xiao2018-10-192-14/+18
| | | | | | * fix deadlock when sqlite * fix clonelink deadlock on sqlite
* Make switch more clear (#5119)Oleg Kovalov2018-10-191-3/+2
|
* Add notification interface and refactor UI notifications (#5085)Lunny Xiao2018-10-182-0/+6
| | | | | | | | * add notification interface and refactor UI notifications * add missing methods on notification interface and notifiy only issue status really changed * implement NotifyPullRequestReview for ui notification
* Add support for search by uid (#4876)zeripath2018-10-181-0/+6
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* refactor: err != nil check, just return error instead (#5093)Bo-Yi Wu2018-10-181-4/+1
|
* feat(topic): search keyword by splitting provided values by , (#4939)Bo-Yi Wu2018-10-172-5/+11
|
* Fix regex to support optional end line of old section in diff hunk (#5096)kolaente2018-10-171-9/+16
| | | + Named groups in reges for easier group parsing
* fix release creation via API (#5076)Lunny Xiao2018-10-152-2/+98
| | | | | | * fix release creation via API * fix release create tests