604 Commits (6ad834e236756e7ba3de27e59681080a7ec4fcf1)

Author SHA1 Message Date
zeripath 07802a2bc5 Refactor repo.isBare to repo.isEmpty #5629 (#5714)
* Refactor repo.isBare to repo.isEmpty #5629

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove Sync call
6 years ago
zeripath 6868378673 Ensure that sessions are passed into queries that could use the database to prevent deadlocks (#5718)
* Fixed deadlock in CreateComment

* Fix possible deadlock in UpdateIssueDeadline from createDeadlineComment

* Ensure that calls to IsTimeTracker enabled are called within session

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Ensure that calls to reactionList are also called within session

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Ensure all calls in NewPullRequest with the session are called within the session

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Deal with potential deadlocks in repo

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Ensure that isStaring is checked within our transaction

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix mistake in isOrganizationMember

Sorry.
6 years ago
Julian 4a685f8b87 Add rebase with merge commit merge style (#3844) (#4052)
Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
6 years ago
Lunny Xiao 1b3404eaca fix forgot deletion of notification when delete repository (#5506) 6 years ago
Lunny Xiao f80b4f46ae Fix repository deletion when there is large number of issues in it (#5426) 6 years ago
Lunny Xiao eabbddcd98
Restrict permission check on repositories and fix some problems (#5314)
* 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
6 years ago
Lunny Xiao c5d098c32e fix bug when users have serval teams with different units on different repositories (#5307) 6 years ago
Lunny Xiao e61c6cd3db fix data race on migrate repository (#5224) 6 years ago
Lunny Xiao 735b12eaf0
fix sqlite lock (#5210) 6 years ago
Lunny Xiao 2b7c366f64
fix sqlite lock (#5184)
* fix sqlite lock

* fix bug

Co-Authored-By: lunny <xiaolunwen@gmail.com>

* fix bug

Co-Authored-By: lunny <xiaolunwen@gmail.com>
6 years ago
Lunny Xiao e7822473e9 Fix race on updatesize (#5190)
* fix race on updatesize

* fix more repoPath
6 years ago
Lunny Xiao 5f938c0c78
Fix sqlite lock (#5176)
* fix sqlite lock

* fix sqlite lock on getUnitType
6 years ago
Lunny Xiao 616b8f42f9 Fix deadlock when sqlite (#5118)
* fix deadlock when sqlite

* fix clonelink deadlock on sqlite
6 years ago
linweijie2012 f98040ad50 fix bug forget to remove Stopwatch when remove repository (#4928) 6 years ago
Lunny Xiao 578cf52ce5
Site admin could create repos even MAX_CREATION_LIMIT=0 (#4645)
* site admin could create repos even MAX_CREATION_LIMIT=0

* Optimize if structure
6 years ago
Lauris BH 0c59edaafa Update xorm to latest version and fix correct `user` table referencing in sql (#4473) 6 years ago
kolaente 1bff02de55 Added dependencies for issues (#2196) (#2531) 6 years ago
Lauris BH 54fedd4070 Add default merge options when adding new repository (#4369) 6 years ago
cezar97 51ba3df5ff Add `noreferrer` to rel='noopener` for <a> tags (#4328) 6 years ago
David Schneiderbauer 0b3ea42847 hide issues from org private repos w/o team assignment (#4034) 6 years ago
David Schneiderbauer a93f13849c Fix not removed watches on unallowed repositories (#4201) 6 years ago
Lauris BH 2b8c0bb5e2 Delete reactions added to issues and comments when deleting repository (#4232) 6 years ago
奶爸 d94472e89b fix #4003 (#4004)
Webhook and hook_task not cleaned up when delete repository
6 years ago
Lunny Xiao 6bdc556b7f
Fix some webhooks bugs (#3981)
* fix some webhooks bugs

* update vendor

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix test

* fix clearlabels

* fix pullrequest webhook bug fix #3492

* update release webhook description

* remove unused code

* fix push webhook in pull request

* small changes
6 years ago
Lunny Xiao 24941a1046
Add more webhooks support and refactor webhook templates directory (#3929)
* add more webhook support

* move hooks templates to standalone dir and add more webhooks ui

* fix tests

* update vendor checksum

* add more webhook support

* move hooks templates to standalone dir and add more webhooks ui

* fix tests

* update vendor checksum

* update vendor

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* load attributes when created release

* update comparsion doc
6 years ago
kolaente 95f2e2b57b Multiple assignees (#3705) 6 years ago
Lauris BH 5ffdf9388b
Fix to use only needed columns from tables to get repository git paths (#3870) 6 years ago
Lauris BH 181b3a8f09 Fix path cleanup in multiple places (#3871) 6 years ago
Lunny Xiao bec69f702b
Add topic support (#3711)
* 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
6 years ago
Allen Wild 15c6bb500b Add repository setting to enable/disable health checks (#3607)
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>
6 years ago
Lunny Xiao 9e5d0a09eb
Global code search support (#3664)
* 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
6 years ago
Allen Wild 8606d9f5bc Add admin dashboard option to run health checks (#3606)
There's one for git gc, why not git fsck too?

Also add a couple more trace logs to GitFsck to see progress
6 years ago
Ethan Koenig bac6ac033a Fix race condition in repo renaming (#3418) 6 years ago
Ethan Koenig c55a027da3 Fix empty checkout bug (#3419) 6 years ago
Wendell Sun b627f1131b Change local copy origin url after repository rename (#3399)
Fix #3378
6 years ago
Lauris BH 8ac1501ad7
Add Pull Request merge options - Ignore white-space for conflict checking, Rebase, Squash merge (#3188)
* Pull request options migration and UI in settings

* Add ignore whitespace functionality

* Fix settings if pull requests are disabled

* Fix migration transaction

* Merge with Rebase functionality

* UI changes and related functionality for pull request merging button

* Implement squash functionality

* Fix rebase merging

* Fix pull request merge tests

* Add squash and rebase tests

* Fix API method to reuse default message functions

* Some refactoring and small fixes

* Remove more hardcoded values from tests

* Remove unneeded check from API method

* Fix variable name and comment typo

* Fix reset commit count after PR merge
7 years ago
Sandro Santilli a192f3052e Serve pull request .diff files (#3293)
* Serve pull request .diff files

Closes #3259

* Add test for pull request redirection and .diff access

* Typo

* There's no need to test for pr.BaseRepo being nil after calling GetBaseRepo
7 years ago
Ethan Koenig 3850bad4c0 Remove unused consts/vars (#3270) 7 years ago
Ethan Koenig 515cdaa85d Fix ignored errors when checking if organization, team member (#3177) 7 years ago
Ethan Koenig e67b4055f9 Fix repo-transfer-and-team-repo-count bug (#3241) 7 years ago
Lunny Xiao f2e20c81b6 Refactor struct's time to remove unnecessary memory usage (#3142)
* refactor struct's time to remove unnecessary memory usage

* use AsTimePtr simple code

* fix tests

* fix time compare

* fix template on gpg

* use AddDuration instead of Add
7 years ago
Ethan Koenig d1efe2078a Fix integration tests (#3141) 7 years ago
Ethan Koenig a0964775ab Sanitize logs for mirror sync (#3057) 7 years ago
Lunny Xiao 35cc5b0402
Remove GetRepositoryByRef and add GetRepositoryByOwnerAndName (#3043)
* remove GetRepositoryByRef and add GetRepositoryByOwnerAndName

* fix tests

* fix tests bug

* some improvements
7 years ago
Ethan Koenig 5866eb2321 Code/repo search (#2582)
Indexed search of repository contents (for default branch only)
7 years ago
Lauris BH eca05b09aa Add commit count caching (#2774)
* 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
7 years ago
Lunny Xiao 985a39590b Use buffersize to reduce database connection when iterate (#2724)
* use buffersize to reduce database connection when iterate

* fix typo

* add default value on app.ini comment
7 years ago
Lauris BH f3833b7ce4 Create new branch from branch selection dropdown (#2130)
* 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
7 years ago
Lauris BH 1ec4dc6c1d Fix so that user can still fork his own repository to owned organizations (#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
7 years ago
Lauris BH f42dbdbae5 Add Activity page to repository (#2674)
* 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
7 years ago