summaryrefslogtreecommitdiff
path: root/app/models/project.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove ignore_column from Project model61302-remove-ignore_column-ci_cdDmitriy Zaporozhets2019-05-101-1/+0
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add improvements to the global search processFrancisco Javier López2019-05-071-12/+16
| | | | | | | Removed the conditions added to Project.with_feature_available_for_user, and moved to the IssuableFinder. Now, we ensure that, in the projects retrieved in the Finder, the user has enough access for the feature.
* Added blank lines to meet style guideEzekiel Kigbo2019-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Un-nest title variable output Update spec test names Rename sort_value_most_stars -> sort_value_stars_desc Rename sorted_by_stars -> sorted_by_stars_desc Renname sort_value_most_stars_asc -> sort_value_stars_asc Invert feature check, assign feature condition to a variable Inline conditional nav bar rendering Invert conditional label Added follow up task Fix filters returning 0 projects show the wrong view Move click action out of test expectation Use proper variable name for project in before block Rename projects_sort_admin_options_hash Renamed projects_sort_admin_options_has to old_projects_sort_options_hash as its not only used on the admin screen Fix extra whitespace errors Stub project_list_filter_bar in the projects_helper specs Added follow up task for `show_projects?` Removed url test expectations
* Added sorted_by_stars_asc scope to projects modelEzekiel Kigbo2019-05-061-0/+3
|
* Merge branch '27777-drop-projects-ci_id-column' into 'master'Douglas Barbosa Alexandre2019-05-021-0/+1
|\ | | | | | | | | | | | | Resolve "Drop "projects"."ci_id" column" Closes #27777 See merge request gitlab-org/gitlab-ce!27623
| * Remove unused projects.ci_id column27777-drop-projects-ci_id-columnDmitriy Zaporozhets2019-05-021-0/+1
| | | | | | | | | | | | And remove Gitlab::Ci::Trace#deprecated_path as it relies on ci_id Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Remove deprecated uses of attribute_changed?9932-fix-deprecated-attribute_changed-ceHeinrich Lee Yu2019-04-301-2/+2
|/ | | | Prepares us for upgrade to Rails 5.2
* Add ProjectMetricsDashboardSetting model and tableReuben Pereira2019-04-261-0/+2
| | | | | | This new table will be used to store the external_dashboard_url which allows users to add a link to their external dashboards (ex Grafana) to the Metrics dashboard.
* Upgrade Rails to 5.1.6.1Jasper Maes2019-04-231-3/+3
| | | | Model.new.attributes now also returns encrypted attributes.
* Fix wrong use of ActiveRecord in PoolRepositoryJacob Vosmaer2019-04-201-5/+3
|
* Externalize strings in app/modelsMartin Wortschack2019-04-121-16/+16
| | | | - Update PO file
* Merge branch 'restore-hipchat' into 'master'Nick Thomas2019-04-111-0/+1
|\ | | | | | | | | | | | | Revert "Remove HipChat integration from GitLab" Closes #60042 See merge request gitlab-org/gitlab-ce!27172
| * Revert "Remove HipChat integration from GitLab"Sean McGivern2019-04-101-0/+1
| | | | | | | | This reverts commit a5378665a1dc0b9c8dc3a4fa279a0eb78aac5aac.
* | Align UrlValidator to validate_url gem implementation.Thong Kuah2019-04-111-1/+1
|/ | | | | | | Renamed UrlValidator to AddressableUrlValidator to avoid 'url:' naming collision with ActiveModel::Validations::UrlValidator in 'validates' statement. Make use of the options attribute of the parent class ActiveModel::EachValidator. Add more options: allow_nil, allow_blank, message. Renamed 'protocols' option to 'schemes' to match the option naming from UrlValidator.
* Revert "Merge branch 'sh-optimize-projects-api' into 'master'"revert-2cc01f12Stan Hu2019-04-101-35/+8
| | | This reverts merge request !26481
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-091-0/+5
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* [CE] Support multiple assignees for merge requestsosw-multi-assignees-merge-requestsOswaldo Ferreira2019-04-081-0/+4
| | | | | Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161 (code out of ee/ folder).
* Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"Andreas Brandl2019-04-051-5/+0
| | | This reverts merge request !26823
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-051-0/+5
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* Stop calling UnlinkRepositoryFromObjectPool RPCJacob Vosmaer2019-04-021-1/+1
| | | | | | | | | | | | | | | | | | | Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/59777. In earlier iterations of our implementation of Git object deduplication we thought we would be making extensive use of Git remotes in pool repositories in the future, and that we should manage these remotes carefully from the start. We now expect we only care about one remote, namely the source project. The other remotes are there only for forensic purposes. Before this MR we tried to also remove pool remotes when member projects got deleted, with the UnlinkRepositoryFromObjectPool RPC. This is fragile when there are race conditions (see https://gitlab.com/gitlab-org/gitaly/issues/1568#note_153955926). We have spent some time making this RPC less fragile in https://gitlab.com/gitlab-org/gitaly/merge_requests/1151 but looking at this problem again, I think we should just stop calling it.
* Inherit from ApplicationRecord instead of ActiveRecord::BaseNick Thomas2019-03-281-1/+1
|
* Skip querying for private projects if they are not requestedStan Hu2019-03-271-6/+21
| | | | | | If the requested visibility levels contains only public and/or internal, omitting private, then we can skip the EXISTS query to search for private projects for the user.
* Optimize /api/v4/projects endpoint for visibility levelStan Hu2019-03-271-5/+17
| | | | | | | | | | Previously when a user requested a list of projects, `Project#public_or_visible_to_user` would search all authorized projects and public/internal projects as well. However, when a user requests a specific `visibility_level` (e.g. private), that should reduce the search space, and we shouldn't need to load public/internal projects. Improves https://gitlab.com/gitlab-org/gitlab-ce/issues/59329
* Allow multiple repositories per projectBob Van Landuyt2019-03-261-7/+3
| | | | | | | | This changes the repository type from a binary `wiki?` to a type. So we can have more than 2 repository types. Now everywhere we called `.wiki?` and expected a boolean, we check that type.
* Merge branch 'refresh-commit-count-after-head-change' into 'master'Stan Hu2019-03-221-0/+1
|\ | | | | | | | | | | | | Refresh commit count after repository head changes Closes #59346 See merge request gitlab-org/gitlab-ce!26473
| * Refresh commit count after repository head changesKamil Trzciński2019-03-221-0/+1
| |
* | Make runners token encryption to be optionalKamil Trzciński2019-03-181-1/+1
| |
* | Merge branch 'refactor-boards-actions' into 'master'Douwe Maan2019-03-151-13/+1
|\ \ | | | | | | | | | | | | Refactor groups and projects boards actions See merge request gitlab-org/gitlab-ce!25568
| * | Remove NUMBER_OF_PERMITTED_BOARDS from ProjectHeinrich Lee Yu2019-03-131-13/+1
| | | | | | | | | | | | We already check max boards in the create service. This is not used.
* | | Run rubocop -aNick Thomas2019-03-131-5/+3
|/ /
* | Enable/disable Auto DevOps at Group levelMayra Cabrera2019-03-121-3/+12
|/ | | | | | | | | | | | - Includes instance methods on Group model to detect when a group has AutoDevOps explicitly/implicitly enabled/disabled. - Includes migration to add a new column to namespaces table - Add UI necessary modifications - Add service and controller to update auto devops related instances - Updates project and groups auto devops badges Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52447
* Adds the Rubocop ReturnNil copAndrew Newdigate2019-03-061-2/+2
| | | | | This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points
* Use encrypted runner tokensKamil Trzciński2019-03-061-1/+1
| | | | | | This makes code to support encrypted runner tokens. This code also finished previously started encryption process.
* Refactor ProjectMigrate and ProjectRollback workersGabriel Mazetto2019-03-011-4/+4
| | | | | Moved to HashedStorage namespace, and added them to the `:hashed_storage` queue namespace
* Adds Rollback functionality to HashedStorage migrationGabriel Mazetto2019-03-011-0/+10
| | | | | | | We are adding sidekiq workers and service classes to allow to rollback a hashed storage migration. There are some refactoring involved as well as part of the code can be reused by both the migration and the rollback logic.
* Merge branch '42086-project-fetch-statistics-api-http-only' into 'master'57125-heatmap-chart-typeNick Thomas2019-02-271-0/+4
|\ | | | | | | | | | | | | Resolve "Project fetch statistics API (HTTP only)" Closes #42086 See merge request gitlab-org/gitlab-ce!23596
| * Add project http fetch statistics APIJacopo2019-02-271-0/+4
| | | | | | | | | | | | The API get projects/:id/traffic/fetches allows user with write access to the repository to get the number of clones for the last 30 days.
* | Merge branch 'ce-revert-d5ce84fd' into 'master'Lin Jen-Shin2019-02-261-3/+3
|\ \ | | | | | | | | | | | | | | | | | | Revert "Merge branch 'revert-82d7b5a0-ce' into 'master'" Closes #57857 and #50747 See merge request gitlab-org/gitlab-ce!25559
| * | Merge branch 'fix-misspellings-app-comments' into 'master'Rémy Coutable2019-02-261-3/+3
| | | | | | | | | | | | | | | Fix misspellings in app/spec comments See merge request gitlab-org/gitlab-ce!25517
* | | Merge branch 'add_YouTrack_integration' into 'master'Sean McGivern2019-02-261-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Added YouTrack integration Closes #42595 See merge request gitlab-org/gitlab-ce!25361
| * | | Added YouTrack integrationYauhen Kotau2019-02-181-0/+1
| | |/ | |/| | | | | | | Fixes gitlab-org/gitlab-ce#42595
* | | Merge branch 'osw-create-and-store-merge-ref-for-mrs' into 'master'Douwe Maan2019-02-261-0/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Support merge ref writing (without merging to target branch) Closes #47110 See merge request gitlab-org/gitlab-ce!24692
| * | | Support merge to ref for merge-commit and squashOswaldo Ferreira2019-02-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the ground work for writing into the merge ref refs/merge-requests/:iid/merge the merge result between source and target branches of a MR, without further side-effects such as mailing, MR updates and target branch changes.
* | | | Fix project set_repository_writable!John Cai2019-02-251-1/+1
| |_|/ |/| |
* | | Revert "Merge branch 'fix-misspellings-app-comments' into 'master'"Michael Kozono2019-02-251-3/+3
|/ / | | | | | | | | This reverts commit 9202bbd129537a698b986e6295d0c783b5a84815, reversing changes made to 4b282e9ce1ae246c4538b3ede18d1380ea778029.
* | Merge branch '7861-cross-project-pipeline-dashboard-mvc-2-ce' into 'master'Grzegorz Bizon2019-02-251-0/+1
|\ \ | | | | | | | | | | | | Delegate last_pipeline to Project See merge request gitlab-org/gitlab-ce!25422
| * | Delegate last_pipeline to ProjectMatija Čupić2019-02-201-0/+1
| |/
* | Hide CI status when pipelines disabledScott Hampton2019-02-251-0/+8
| | | | | | | | | | | | Pipeline status was showing failed on projects when CI was disabled. This checks to see if the feature is enabled before showing the status.
* | Fix misspellings in app/spec commentsTakuya Noguchi2019-02-251-3/+3
|/ | | | Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* Adding convenience method to project modelJohn Cai2019-02-111-0/+4
|