summaryrefslogtreecommitdiff
path: root/app/models/project.rb
Commit message (Collapse)AuthorAgeFilesLines
* First pass at deleting projects in the background.Josh Frye2016-01-291-0/+1
|
* Fix specsDouwe Maan2016-01-281-1/+2
|
* Correctly determine MR diff base when MR has merge conflictsDouwe Maan2016-01-271-0/+4
|
* Backport some changes from EEes_backportValery Sizov2016-01-221-0/+4
|
* Merge branch 'add-public-param-to-project-api' into 'master' Dmitriy Zaporozhets2016-01-191-0/+4
|\ | | | | | | | | | | | | Add public params to GET /projects api. Closes #3788 See merge request !2409
| * Add specs. Adjust filter.Josh Frye2016-01-191-1/+1
| |
| * Change 'public' flag to more robust 'visibility' query.Josh Frye2016-01-191-0/+4
| |
* | Greatly improve external_issue_tracker performanceimprove-project-external-issue-trackersYorick Peterse2016-01-191-5/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This greatly improves the performance of Project#external_issue_tracker by moving most of the fields queried in Ruby to the database and letting the database handle all logic. Prior to this change the process of finding an external issue tracker was along the lines of the following: 1. Load all project services into memory. 2. Reduce the list to only services where "issue_tracker?" returns true 3. Reduce the list from step 2 to service where "default?" returns false 4. Find the first service where "activated?" returns true This has to two big problems: 1. Loading all services into memory only to reduce the list down to a single item later on is a waste of memory (and slow timing wise). 2. Calling Array#select followed by Array#reject followed by Array#find allocates extra objects when this really isn't needed. To work around this the following service fields have been moved to the database (instead of being hardcoded): * category * default This in turn means we can get the external issue tracker using the following query: SELECT * FROM services WHERE active IS TRUE AND default IS FALSE AND category = 'issue_tracker' AND project_id = XXX LIMIT 1 This coupled with memoizing the result (just as before this commit) greatly reduces the time it takes for Project#external_issue_tracker to complete. The exact reduction depends on one's environment, but locally the execution time is reduced from roughly 230 ms to only 2 ms (= a reduction of almost 180x). Fixes gitlab-org/gitlab-ce#10771
* Fix the undefinded variable error in Project's safe_import_url methodDJ Mountney2016-01-131-1/+1
|
* Before project save ensure that a runners_token existsStan Hu2016-01-101-0/+1
|
* Fix Error 500 when visiting build page of project with nil runners_tokenStan Hu2016-01-101-4/+6
| | | | | | | Properly ensure that the token exists and add defensively check for a non-nil value. Closes #4294
* Annotate modelsStan Hu2016-01-061-0/+7
|
* Merge branch 'brunsa2/gitlab-ce-diverging-branch-graphs' into 'master' Douwe Maan2016-01-051-0/+2
|\ | | | | | | | | | | | | Add graphs of commits ahead/behind default branch (by @brunsa2) Replaces https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1716 See merge request !2301
| * Merge branch 'master' into diverging-branch-graphsJeff Stubler2015-12-031-11/+47
| |\
| * \ Merge branch 'master' into diverging-branch-graphsJeff Stubler2015-11-121-2/+6
| |\ \
| * | | Add graphs showing commits ahead and behind default to branches pageJeff Stubler2015-11-011-0/+2
| | | |
* | | | Added system hooks messages for renaming and transferring a projectSteve Norman2016-01-041-0/+6
| | | |
* | | | Fix project transfer e-mail sending incorrect paths in e-mail notificationStan Hu2015-12-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of ActiveJob and `deliver_now` in 7f214cee7 caused a race condition where the mailer would be invoked before the project was committed to the database, causing the transfer e-mail notification to show the old path instead of the new one. Closes #4670
* | | | Merge branch 'fix/visibility-level-setting-in-forked-projects' into 'master' Douwe Maan2015-12-241-3/+24
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix/visibility level setting in forked projects Fixes #3136 /cc @DouweM See merge request !1744
| * \ \ \ Merge branch 'master' into fix/visibility-level-setting-in-forked-projectsTomasz Maczukin2015-12-211-38/+68
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (723 commits) Bump Rack Attack to v4.3.1 for security fix Remove duplicate entry in the changelog Remove extra spaces after branchname Fix merge-request-reopen button title Add branch and tag operation to tree dropdown Use gitlab-shell 2.6.9 Clarify Windows shell executor artifact upload support Fix feature specs: we always show the build status if ci_commit is present Do not display project group/name when issue and MR are in same project Don't create CI status for refs that doesn't have .gitlab-ci.yml, even if the builds are enabled Use gitlab-workhorse 0.5.1 Fix ci_projects migration by using the value only from latest row [ci skip] Revert sidebar position for issue and merge request Add info on using private Docker registries in CI [ci skip] Upgrade Poltergeist to 1.8.1. #4131 Fix ux issue with "This issue will be closed automatically" message Move MR Builds tab next to Commits Api support for requesting starred projects for user Fix Rubocop complain. Fix merge widget JS for buttons ... Conflicts: app/models/project.rb
| * \ \ \ \ Merge branch 'master' into fix/visibility-level-setting-in-forked-projectsTomasz Maczukin2015-11-201-13/+54
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (296 commits) fox tests Don't rescue Exception, but StandardError adressing comments Update gitlab-shell documentation [ci skip] Align hash literals in IssuesFinder spec Fix tests Fix 'Attach a file' link in new tag form Add link to git-lfs client [ci skip] Do not limit workhorse POST/PUT size in NGINX added specs added spinach tests Since GitLab CI is enabled by default, remove enabling it by pushing .gitlab-ci.yml Fix tests Commits without .gitlab-ci.yml are marked as skipped Changelog entry for finding issues performance Use a JOIN in IssuableFinder#by_project Memoize IssuableFinder#projects Removed trailing whitespace from IssuableFinder Added benchmark for IssuesFinder Updated DB schema with new issues/projects indexes ... Conflicts: app/models/project.rb
| * | | | | | Change update_forks_visibility_level into after_update hook in Project modelTomasz Maczukin2015-11-201-0/+13
| | | | | | |
| * | | | | | Change forks method to has_many relationTomasz Maczukin2015-11-181-6/+5
| | | | | | |
| * | | | | | Update forks visibility_level after parent project visibility_level changeTomasz Maczukin2015-11-041-1/+5
| | | | | | |
| * | | | | | Fix Project update serviceTomasz Maczukin2015-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When project is updated and it is a fork, then visibility_level should not be less restrictive than in its parent project.
| * | | | | | Move visibility_level check for forked projects to Project modelTomasz Maczukin2015-11-031-0/+5
| | |_|/ / / | |/| | | |
* | | | | | Backport JIRA serviceDrew Blessing2015-12-181-0/+8
| |_|/ / / |/| | | |
* | | | | Fix bad mergeStan Hu2015-12-161-1/+0
| | | | |
* | | | | Merge branch 'add-open-issues-count-to-api' of ↵Dmitriy Zaporozhets2015-12-161-0/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.com/stanhu/gitlab-ce Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | | | | Add open_issues_count to project APIStan Hu2015-12-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This is needed to support Huboard and a generally useful value.
* | | | | | Fixed Rubocop offensesGabriel Mazetto2015-12-151-5/+5
| | | | | |
* | | | | | Fix specsKamil Trzcinski2015-12-111-2/+4
| | | | | |
* | | | | | Remove ci_ prefix from all ci related thingsKamil Trzcinski2015-12-111-8/+8
| | | | | |
* | | | | | Add runners tokenKamil Trzcinski2015-12-111-7/+9
| | | | | |
* | | | | | Migrate CI::Project to ProjectKamil Trzcinski2015-12-111-26/+46
| | | | | |
* | | | | | Migrate CI::Services and CI::WebHooks to Services and WebHooksKamil Trzcinski2015-12-101-0/+1
|/ / / / /
* | | | | Merge branch 'master' into tmp-reference-pipeline-and-cachingtmp-reference-pipeline-and-cachingDouwe Maan2015-12-101-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # spec/lib/gitlab/markdown/autolink_filter_spec.rb # spec/lib/gitlab/markdown/commit_range_reference_filter_spec.rb # spec/lib/gitlab/markdown/commit_reference_filter_spec.rb # spec/lib/gitlab/markdown/cross_project_reference_spec.rb # spec/lib/gitlab/markdown/emoji_filter_spec.rb # spec/lib/gitlab/markdown/external_issue_reference_filter_spec.rb # spec/lib/gitlab/markdown/external_link_filter_spec.rb # spec/lib/gitlab/markdown/issue_reference_filter_spec.rb # spec/lib/gitlab/markdown/label_reference_filter_spec.rb # spec/lib/gitlab/markdown/merge_request_reference_filter_spec.rb # spec/lib/gitlab/markdown/redactor_filter_spec.rb # spec/lib/gitlab/markdown/reference_gatherer_filter_spec.rb # spec/lib/gitlab/markdown/relative_link_filter_spec.rb # spec/lib/gitlab/markdown/sanitization_filter_spec.rb # spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb # spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb # spec/lib/gitlab/markdown/table_of_contents_filter_spec.rb # spec/lib/gitlab/markdown/task_list_filter_spec.rb # spec/lib/gitlab/markdown/upload_link_filter_spec.rb # spec/lib/gitlab/markdown/user_reference_filter_spec.rb
| * | | | | Update annotationsStan Hu2015-12-081-0/+1
| | | | | |
* | | | | | Merge branch 'master' into reference-pipeline-and-cachingreference-pipeline-and-cachingDouwe Maan2015-12-081-1/+1
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Add custom UrlValidatorRobert Speicher2015-12-071-1/+1
| | |_|_|/ | |/| | |
* | | | | Merge branch 'master' into reference-pipeline-and-cachingDouwe Maan2015-12-021-2/+1
|\ \ \ \ \ | |/ / / /
| * | | | Remove enumerize gemrs-remove-enumerizeRobert Speicher2015-11-251-2/+1
| | |/ / | |/| |
* | | | Merge branch 'master' into reference-pipeline-and-cachingDouwe Maan2015-11-191-13/+54
|\ \ \ \ | |/ / /
| * | | Merge branch 'atom-feed-latest-update' into 'master' Yorick Peterse2015-11-191-0/+4
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve performance of user profiles, finding groups, and finding projects This MR improves the following: * Rendering of profile pages and Atom feeds * Finding groups (using GroupsFinder & friends) * Finding projects (using ProjectsFinder & friends) Initially this MR was intended to only improve rendering of Atom feeds, but over time other fixes were introduced as well as the same code was the cause of all these problems. See merge request !1790
| | * | | Added Project.visible_to_userYorick Peterse2015-11-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | This method can be used to filter projects to those visible to a given user.
| * | | | Add Project#safe_import_url helper.Douwe Maan2015-11-181-0/+8
| | | | |
| * | | | Store and show reason why import failed.Douwe Maan2015-11-181-4/+6
| |/ / /
| * | | Refactor ability changesDouwe Maan2015-11-171-3/+1
| | | |
| * | | Merge branch 'master' into james11/gitlab-ce-removable-group-ownerDouwe Maan2015-11-171-8/+35
| |\ \ \
| | * | | Add support for git lfs.lfsMarin Jankovski2015-11-161-0/+12
| | | | |