summaryrefslogtreecommitdiff
path: root/app/models/project.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Remove HipChat integration from GitLabNick Thomas2019-02-081-1/+0
|
* Add convenience methods for creating project and Wiki repositoriesStan Hu2019-02-051-1/+1
| | | | This makes it easier to access other project arguments in the future.
* Send project name with Gitaly repository requestsStan Hu2019-02-051-1/+1
| | | | | | | When hashed storage is in use, it's helpful to have the project name associated with the request. Closes https://gitlab.com/gitlab-org/gitaly/issues/1394
* Add programming language filtering to `/projects`Dylan MacKenzie2019-02-041-0/+10
|
* Fix template labelsFelipe Artur2019-02-041-1/+1
|
* Fix ReturnInVoidContext rubocop offenseSemyon Pupkov2019-02-011-5/+7
|
* [master] Pipelines section is available to unauthorized usersKamil Trzciński2019-01-311-0/+8
|
* Group Guests are no longer able to see merge requestsTiago Botelho2019-01-311-7/+15
| | | | | | | Group guests will only be displayed merge requests to projects they have a access level to, higher than Reporter. Visible projects will still display the merge requests to Guests
* Fix slow project reference pattern regexHeinrich Lee Yu2019-01-311-0/+1
|
* Merge branch 'ab-54270-github-iid' into 'master'Yorick Peterse2019-01-291-0/+7
|\ | | | | | | | | | | | | Reduce amount of locks needed for GitHub importer Closes #54270 and #51817 See merge request gitlab-org/gitlab-ce!24102
| * Flush InternalId records after importAndreas Brandl2019-01-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After the import has finished, we flush (delete) the InternalId records related to the project at hand. This means we're starting over with tracking correct internal id values, a new record will be created automatically when the next internal id is generated. The GitHub importer assigns iid values by using supplied values from GitHub. We skip tracking internal id values during the import in favor of higher concurrency. Deleting any InternalId records after the import has finished is an extra measure to guarantee consistency. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54270.
* | Add GitLab Pages predefined variablesAdrian Moisey2019-01-291-0/+8
|/
* Merge branch 'refactor-checking-personal-project-limits' into 'master'Nick Thomas2019-01-161-10/+14
|\ | | | | | | | | Refactor checking personal project limits See merge request gitlab-org/gitlab-ce!24396
| * Refactor checking personal project limitsYorick Peterse2019-01-161-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This refactors the code used for checking if a user has exceeded the personal projects limit. As part of this refactor the method has been renamed from Project#check_limit to "check_personal_projects_limit", as this name makes it much more clear what the purpose of the method is. Standalone unit tests have also been added, as before we only had a single generic validation test that did not cover all cases. The old implementation of the refactored method also included a `rescue` statement. This code would only run when a project creator was not set. The error that would be added wasn't super useful, especially since there would already be errors for the creator not being present. As none of the other code in the "check_personal_projects_limit" raises, it has been removed.