summaryrefslogtreecommitdiff
path: root/app/models/project.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ci skip] Add a comment explaining validate_board_limit callbackfix/validate-board-limitDouglas Barbosa Alexandre2016-10-201-0/+7
| | | | | | Callback associations are not common to see around. We want to make clear that the `before_add` callback uses the number before the addition, in this particular case 1.
* Create project feature when project is createdissue_22944Felipe Artur2016-10-191-6/+1
|
* Merge branch 'feature/group-level-labels' into 'master' Douwe Maan2016-10-191-5/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add group level labels ## What does this MR do? Add group level labels. ## Are there points in the code the reviewer needs to double check? * `LabelsFinder` * `Gitlab::Gfm::ReferenceRewriter` * `Banzai::Filter::LabelReferenceFilter` ## Why was this MR needed? We'll be adding more feature that allow you to do cross-project management of issues. ## Screenshots (if relevant) * Group Labels ![Group Labels](/uploads/2244c06ad68eae4fb246fb4c81bf8060/2.png) * Project Labels ![Project Labels](/uploads/c5839516d2282b51f7418d9dadbeceb4/1.png) * Expanded references for group labels when moving issue to another project ![Expanded references for group labels when moving issue to another project](/uploads/0c9ab248a8420d4978d59349ae3d42e5/3.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? #19997 See merge request !6425
| * Rename Labels::CreateService to Labels::FindOrCreateServiceDouglas Barbosa Alexandre2016-10-191-1/+1
| |
| * Remove unused method Project#all_labelsDouglas Barbosa Alexandre2016-10-191-4/+0
| |
| * Update specs to cope with new label types and prioritiesJames Lopez2016-10-191-0/+4
| | | | | | | | | | | | Fixed all related specs and also changed the logic to handle edge cases. This includes exporting and exporting of group labels, which will get associated with the new group (if any) or they will become normal project labels otherwise. Found other issues to do with not being able to import all labels at once in the beginning of the JSON - code was much simpler when we import all labels and milestones associated to a project first, then the associations will find the already created labels instead of creating them from the associations themselves.
| * User Labes::CreateService to create labelsDouglas Barbosa Alexandre2016-10-191-1/+2
| |
| * Use Label.attributes instead of Label.dup when creating label templatesDouglas Barbosa Alexandre2016-10-191-6/+1
| |
| * Reuse LabelsFinder on Banzai::Filter::LabelReferenceFilterDouglas Barbosa Alexandre2016-10-191-0/+4
| |
| * Add ProjectLabel modelDouglas Barbosa Alexandre2016-10-191-2/+4
| |
* | Prevent wrong markdown on issue ids when project has Jira service activatedissue_828Felipe Artur2016-10-191-0/+4
|/
* Merge branch '22191-delete-dynamic-envs-mr' into 'master' Rémy Coutable2016-10-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete dynamic environments - Adds "close environment" action to a merge request - Adds tabs to environments list - Adds close button to each environment row in environments list - Replaces Destroy button with Close button inside an environment - Adds close button to builds list inside an environment #### Configuration In order to enable stopping environments a valid `.gitlab-ci.yml` syntax has to be used: ``` review: environment: name: review/$app on_stop: stop_review stop_review: script: echo Delete My App when: manual environment: name: review/$app action: stop ``` This MR requires that `stop_review` has to have: `when`, `environment:name` and `environment:action` defined. The next MR after this one will verify that and enforce that these settings are configured. It will also implicitly configure these settings, making it possible to define it like this: ``` review: environment: name: review/$app on_stop: stop_review stop_review: script: echo Delete My App ``` Closes #22191 See merge request !6669
| * Refactor code to use available and stopped statuses and refactor views to ↵Kamil Trzcinski2016-10-171-1/+1
| | | | | | | | use separate renders
| * Merge remote-tracking branch 'origin/master' into 22191-delete-dynamic-envs-mrKamil Trzcinski2016-10-171-21/+15
| |\
| * | Make environments to be close ableKamil Trzcinski2016-10-061-1/+1
| | |
* | | Merge remote-tracking branch 'upstream/master' into pipeline-emailsLin Jen-Shin2016-10-171-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (148 commits) Fix broken rspec in compare text Added logic to handle a revision input that does not exist in the menu Fix broken Spinach tests caused by changes in !6550 Convert CHANGELOG to Markdown Fix active tab test for branches page Fix merge requests feature tests Wait for ajax call in merge request unsubscribe test Fix 500 error when creating mileston from group page Fix 404 when group path has dot in the name Add the tech writers usernames in the doc_sytleguide doc Fix broken SCSS linter errors due to missing newlines Fix Hash syntax to work for both Ruby 2.1 and 2.3 Fix Spinach merge request diff failures remove ashley since she no longer works here Revert "Improve tabbing usability for sign in page" Don't use member properties in users_spec, and remove loading ref. Clean up stray Sign up ref. Back off the array spreading, bc poltergeist freaks out. Convert dispatcher to es6. Add exists to users routes and fix endpoint. ...
| * | Merge branch 'fix/mirror-update-error' into 'master' Rémy Coutable2016-10-141-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix empty import URL errors CE version of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/780 See merge request !6693
| | * | fix empty import URL errorsfix/mirror-update-errorJames Lopez2016-10-051-1/+1
| | | |
* | | | Merge remote-tracking branch 'upstream/master' into pipeline-emailsLin Jen-Shin2016-10-141-20/+11
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (237 commits) Grapify boards API Add test, fix merge error Use local assigns to get the dropdown title Updated issuable dropdown titles Added safety check for formatted values Minor style improvement Fixed conflict and corrected teaspoon test Rename method in test Moved ci_status environments logic to new action ci_envrionments_status and set up frontend polling Refactor ci_status on MergeRequestController Fix indenting error in HAML Show what time ago a MR was deployed Fixed missing links Fixed missing links Refactor merge requests revisions Add link to update docs for source installations Grapify todos API Link to review apps example from docs fix grafana_configuration.md move link Do not run before_script, artifacts, cache in trigger_docs job ...
| * | | Merge branch '15463-extract-update-merge-requests' into 'master' Yorick Peterse2016-10-141-5/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Extract project#update_merge_requests to its own worker from GitPushService See merge request !6767
| | * | | Extract project#update_merge_requests and SystemHooks to its own worker from ↵15463-extract-update-merge-requestsPaco Guzman2016-10-131-5/+0
| | | | | | | | | | | | | | | | | | | | GitPushService
| * | | | Add Project::BoardLimitExcedeed error classDouglas Barbosa Alexandre2016-10-111-1/+3
| | | | |
| * | | | Restrict the number of permitted boards per project to oneDouglas Barbosa Alexandre2016-10-111-1/+6
| | | | |
| * | | | Allow projects to have many boardsDouglas Barbosa Alexandre2016-10-111-2/+1
| |/ / /
| * | | Precalculate trending projectsprecalculate-trending-projectsYorick Peterse2016-10-101-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a Sidekiq worker that precalculates the list of trending projects on a daily basis. The resulting set is stored in a database table that is then queried by Project.trending. This setup means that Unicorn workers no longer _may_ have to calculate the list of trending projects. Furthermore it supports filtering without any complex caching mechanisms. The data in the "trending_projects" table is inserted in the same order as the project ranking. This means that getting the projects in the correct order is simply a matter of: SELECT projects.* FROM projects INNER JOIN trending_projects ON trending_projects.project_id = projects.id ORDER BY trending_projects.id ASC; Such a query will only take a few milliseconds at most (as measured on GitLab.com), opposed to a few seconds for the query used for calculating the project ranks. The migration in this commit does not require downtime and takes care of populating an initial list of trending projects.
* | | | Merge remote-tracking branch 'upstream/master' into pipeline-emailsLin Jen-Shin2016-10-081-0/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (292 commits) Deletes extra empty line breaking the build Optimize the `award_user_list` helper spec Fix typo and add he MWBS accronym for "Merge When Build Succeeds" Added missing content and improved layout ExpireBuildArtifactsWorker query builds table without ordering enqueuing one job per build to cleanup Improve the contribution and MR review guide Updates test in order to look for link Make projects API docs match parameter style Fix Event#reset_project_activity updates Update user whitelist reject message Call ensure_secret_token! in secret token test's before block since it would be called in an initializer. Add a CHANGELOG for CacheMarkdownField Enable CacheMarkdownField for the remaining models Make search results use the markdown cache columns, treating them consistently Use CacheMarkdownField for notes Add markdown cache columns to the database, but don't use them yet Update issue board spec Link to Registry docs from project settings Truncate long labels with ellipsis in labels page Improve issue load time performance by avoiding ORDER BY in find_by call ...
| * | | Add markdown cache columns to the database, but don't use them yetNick Thomas2016-10-071-0/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a number of _html columns and, with the exception of Note, starts updating them whenever the content of their partner fields changes. Note has a collision with the note_html attr_accessor; that will be fixed later A background worker for clearing these cache columns is also introduced - use `rake cache:clear` to set it off. You can clear the database or Redis caches separately by running `rake cache:clear:db` or `rake cache:clear:redis`, respectively.
| * | Exclude system notes from Project.trendingYorick Peterse2016-10-041-0/+1
| |/ | | | | | | | | | | | | Having many system notes isn't really an indication of a project being trending. Including these notes would lead to projects with lots of commit cross references (for example) showing up in the trending projects list.
* | Merge remote-tracking branch 'upstream/master' into pipeline-emailsLin Jen-Shin2016-10-041-4/+17
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (372 commits) Enable Lint/StringConversionInInterpolation cop and autocorrect offenses resolve duplicated changelog entry credit myself :smile: change determine conditions override subject method in devise mailer follow the styleguide: Don't use parentheses around a literal wrap subject with method subject move spec back into shared example `an email sent from GitLab` stub config settings in spec remove empty line at block body end remove extra entry create new test in `spec/mailers/notify_spec.rb` move changelog to 8.13 add configurable email subject suffix Fixes sidebar navigation. Convert "SSH Keys" Spinach features to RSpec Enable import/export back for non-admins Update gitlab-shell to 3.6.3 Updated artwork of empty group state. Better empty state for Groups view. ...
| * Allow Member.add_user to handle access requestersRémy Coutable2016-09-281-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes include: - Ensure Member.add_user is not called directly when not necessary - New GroupMember.add_users_to_group to have the same abstraction level as for Project - Refactor Member.add_user to take a source instead of an array of members - Fix Rubocop offenses - Always use Project#add_user instead of project.team.add_user - Factorize users addition as members in Member.add_users_to_source - Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects - Destroy any requester before adding them as a member - Improve the way we handle access requesters in Member.add_user Instead of removing the requester and creating a new member, we now simply accepts their access request. This way, they will receive a "access request granted" email. - Fix error that was previously silently ignored - Stop raising when access level is invalid in Member, let Rails validation do their work Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Scope environments to projectlimit-number-of-shown-environmentsKamil Trzcinski2016-09-211-1/+1
| |
| * Add tests to verify the correctness of returned environmentsKamil Trzcinski2016-09-211-1/+1
| |
| * Limit number of shown environments for Merge RequestsKamil Trzcinski2016-09-211-0/+16
| | | | | | | | | | - For target project show only environments for target branch or with tags - For source project show only environments for source branch
* | Merge remote-tracking branch 'upstream/master' into pipeline-emailsLin Jen-Shin2016-09-211-6/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (206 commits) Implement fourth round of comments from @DouweM. Fix `CreateDeploymentService` spec. Reload issues in spec to ensure label<->issue mapping properly loaded Fix build. Remove unnecessary #{} in cycle analytics template. Update cycle analytics icon and fix color of the dismiss button. Use triple dashes for the empty value in cycle analytics. Fix typo on cycle analytics copy. Add page title and fix sub menu width in Cycle Analytics page. Update Cycle Analytics Read more link URL. Display the cycle analytics navbar based on the `:read_cycle_analytics` ability. Improve indentation in `Gitlab::Database::Median` Add a spec for merge request metric caching while refreshing a merge request from a forked project. Use the `IssuableBaseService` lifecycle hooks to cache `MergeRequestsClosingIssues` Implement a second round of review comments from @DouweM. Add docs on Cycle Analytics Test if issue authors can access private projects Update .pkgr.yml with Ubuntu 16.04 dependencies fix issues mr counter Move JSON generation (cycle analytics) into a controller method. ...
| * Merge branch 'master' into per-build-tokenKamil Trzcinski2016-09-191-3/+2
| |\
| * \ Merge remote-tracking branch 'origin/master' into per-build-tokenKamil Trzcinski2016-09-151-1/+17
| |\ \ | | | | | | | | | | | | | | | | # Conflicts: # db/schema.rb
| * | | Use a permissions of user to access all dependent projects from CI jobs ↵Kamil Trzcinski2016-09-131-6/+0
| | | | | | | | | | | | | | | | (this also includes a container images, and in future LFS files)
* | | | Merge remote-tracking branch 'upstream/master' into pipeline-emailsLin Jen-Shin2016-09-191-3/+2
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (97 commits) Add missing spec for ProtectedBranches::CreateService Add specs that target status failure Return created status Document how to download the latest build artifacts Clarify why GH integration is the preferred importing method Refactor GitHub importing documentation Update GitHub importer documentation to reflect current importer state Formatting fix in doc/ci/examples/README.md Refactor boards_spec.rb to avoid code duplication Replace contributions calendar timezone payload with dates Use oj gem for faster JSON processing Render invalid template for merge requests without source project and open Bump fog-aws and other dependent modules Fix API notes endpoint when posting only emoji Doesnt run JS if active element doesnt exist Add missing CHANGELOG entry Remove schema annotations completely fixed incorrect reference to @repository.root_ref in _readme.html.haml. #22083 Scrolls active tab into middle of nav on mobile MergeRequest#environments now returns an empty array when diff_head_commit is nil ...
| * | | Improved helper methods, better flow for `project.lfs_enabled?`, and UI fixes.Patricio Cano2016-09-151-4/+0
| | | |
| * | | Added group-specific setting for LFS.Patricio Cano2016-09-151-3/+6
| | |/ | |/| | | | | | | Groups can enable/disable LFS, but this setting can be overridden at the project level. Admin only
* | | Prefer public_send, feedback:Lin Jen-Shin2016-09-141-1/+1
| | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6019/diffs#note_15335949
* | | Merge remote-tracking branch 'upstream/master' into pipeline-emailsLin Jen-Shin2016-09-141-1/+17
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (64 commits) Update the 8.11 to 8.12 update documentation to use gitlab-shell 3.5.0 Update GITLAB_SHELL_VERSION Move pushes_since_gc to Redis Fix Gitlab::Popen.popen thread-safety issue Allow trailing newline in secret base64 data Improve .haml-lint.yml, simplify the haml_lint task and remove CHANGELOG entry Fix a typo in documentation Restore SSH Key title auto-population behavior Add test with inactive error use case for 'POST /ci/api/v1/builds/register.json' Fix rubocop offences Update API documentation Update CHANGELOG Change response for /ci/api/v1/builds/register.json from 404 to 204 Document the fact that merge requests from private forks can be checked out locally Change method name to #reopenable? Improve grammar Fix not working test with execute Add CHANGELOG Improve grammar Add #can_reopen? and tests ...
| * | Move pushes_since_gc to Redispushes-since-gc-redisYorick Peterse2016-09-131-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves tracking of the pushes since the last Git GC from PostgreSQL to Redis. This reduces the number of writes on the "projects" table. This in turn reduces the vacuuming overhead. The lease used for incrementing the counter has been removed. This lease was mostly put in place to prevent high database load but this isn't needed anymore due to the counter now being stored in Redis. Fixes gitlab-org/gitlab-ce#22125
| * | Fix two problematic bits of code that will be deprecated or broken in Rails 5.Connor Shea2016-09-051-1/+1
| |/
* | Merge remote-tracking branch 'upstream/master' into pipeline-emailsLin Jen-Shin2016-09-121-14/+38
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (671 commits) Only check :can_resolve permission if the note is resolvable Use Search::GlobalService.new in the `GET /projects/search/:query` endpoint Improve PipelinesFinder spec so that it does not depend on hard-coded database IDs Add changelogs/unreleased/.gitkeep Archive CHANGELOG entries prior to 8.0 in changelogs/archive.md Request only the LDAP attributes we need Add notification_settings API calls Use NotificationSetting::EMAIL_EVENTS for params Pull import sources from Gitlab::ImportSources Fix API issues sorting Use gitlab-workhorse 0.8.1 Update CHANGELOG Avoid conflict with admin labels when importing GitHub labels Search should compare only the lowercase versions of the project names Enable pipeline events by default Minor update on CI docs examples Move write_note into SlashCommandsHelper and update other dependent specs Wait for logout message in login_helpers Use wait_for_ajax to avoid database deadlocks after specs are cleaned Fix spec failures with spec/features/issues/user_uses_slash_commands_spec.rb Require comments must be included before code ...
| * Project tools visibility levelFelipe Artur2016-09-011-10/+17
| |
| * Renamed `enable_lfs` to `lfs_enabled` for the Project field, and related fixes.project-specific-lfsPatricio Cano2016-08-301-2/+2
| |
| * Syntax and style fixes.Patricio Cano2016-08-301-1/+4
| |
| * Added project specific enable/disable setting for LFSPatricio Cano2016-08-301-0/+4
| |
| * Merge branch 'artifacts-from-ref-and-build-name' into 'master' Douwe Maan2016-08-301-4/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a download buttons for Build Artifacts ## What does this MR do? This MR adds a download buttons for build artifacts of latest succesful pipeline in: - dashboard of project, - branches and tags views, - and tree viewer Implement #4255 ## What are the relevant issue numbers? Closes #4255, Closes #14419 ## Screenshots ### Project main ![](/uploads/29ee2154a214416059a875f2715d4fa3/Screen_Shot_2016-08-24_at_8.00.31_PM.png) ### Branches ![](/uploads/9220c593288370986fbc1d42a1425ef7/Screen_Shot_2016-08-24_at_8.02.01_PM.png) ### Tags ![](/uploads/a843e8103221fea475a0cf9d62a1999d/Screen_Shot_2016-08-24_at_8.03.32_PM.png) ### Source Tree ![](/uploads/63cd3c8c91b6f427c166dc90d8e3c059/Screen_Shot_2016-08-24_at_8.04.56_PM.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] Download buttons - [x] Models - [x] Routes - [x] Projects::ArtifactsController - [x] API - Tests - Rails - [x] Project#builds_for - [x] branch name with slashes - [x] only success builds - [x] only latest builds - [x] feature tests for download buttons - API - [x] branch name with slashes - [x] only success builds - [x] only latest builds - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5142