summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Enable mapping to nil in enumsrails5-enum-nilJan Provaznik2018-05-313-21/+36
| | | | | | | | | | | | Enum in Rails 5 does not map nil values - IOW nil value remains nil, even if there is a key with nil value in the enum definition. This commit overrides the underlying Enum methods so nil value is still mapped. This solution is far from being ideal: it uses dynamic definition of methods which introduces more magic/confusion into the codebase. It would be better to get rid of the nil value in enums.
* Merge branch '41587-osw-mr-metrics-migration-take-two' into 'master'Grzegorz Bizon2018-05-313-2/+2
|\ | | | | | | | | Take two for MR metrics population background migration See merge request gitlab-org/gitlab-ce!19097
| * Ensure metrics regardless of being imported on MRs41587-osw-mr-metrics-migration-take-twoOswaldo Ferreira2018-05-303-2/+2
| |
* | Export assigned issues in iCalendar feedImre Farkas2018-05-312-10/+14
| |
* | Merge branch 'fj-36819-remove-v3-api' into 'master'Douwe Maan2018-05-312-12/+1
|\ \ | | | | | | | | | | | | | | | | | | Removal of API v3 from the codebase Closes #36819 See merge request gitlab-org/gitlab-ce!18970
| * | Removed API endpoint and specsfj-36819-remove-v3-apiFrancisco Javier López2018-05-302-12/+1
| |/
* | Make Repository#blob_data_at a public methodStan Hu2018-05-301-8/+8
|/ | | | | This reduces conflicts with EE, where it is public because it is called in ee/lib/gitlab/ci/external/file/local.rb.
* Merge branch 'rails5-boolean-cast' into 'master'46973-job-failed-71275338Rémy Coutable2018-05-301-2/+3
|\ | | | | | | | | | | | | Fix boolean casting for nil value Closes #46925 See merge request gitlab-org/gitlab-ce!19202
| * Fix boolean casting for nil valueJan Provaznik2018-05-291-2/+3
| | | | | | | | | | | | `nil` value is not included in `ActiveModel::Type::Boolean::FALSE_VALUES` which caused that in Rails 5 the boolean_accessor converted `nil` to `true` instead of `false`.
* | Merge branch 'blackst0ne-squash-and-merge-in-gitlab-core-ce' into 'master'Phil Hughes2018-05-302-0/+15
|\ \ | | | | | | | | | | | | | | | | | | Resolve "Squash and merge in GitLab Core (CE)" Closes #34591 See merge request gitlab-org/gitlab-ce!18956
| * | Add 'squash and rebase' feature to CEblackst0ne-squash-and-merge-in-gitlab-core-ceblackst0ne2018-05-292-0/+15
| |/
* | Merge branch 'sh-batch-dependent-destroys' into 'master'Robert Speicher2018-05-292-0/+29
|\ \ | | | | | | | | | | | | | | | | | | Fix project destruction failing due to idle in transaction timeouts Closes #44610 See merge request gitlab-org/gitlab-ce!18609
| * | Fix project destruction failing due to idle in transaction timeoutssh-batch-dependent-destroysStan Hu2018-05-242-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When deleting associated records, Rails loads all associations into memory (https://github.com/rails/rails/issues/22510) before destroying them. This can cause a surge in memory and cause destruction of objects to fail due to idle in transaction database timeouts. This fix is inspired from https://github.com/thisismydesign to destroy `has_many` relationships in batches. Closes #44610
* | | Merge branch 'ab-35364-throttle-updates-last-repository-at' into 'master'Yorick Peterse2018-05-291-0/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Throttle updates to Project#last_repository_updated_at. Closes #35364 See merge request gitlab-org/gitlab-ce!19183
| * | | Throttle updates to Project#last_repository_updated_at.Andreas Brandl2018-05-291-0/+2
| | | | | | | | | | | | | | | | Closes #35364.
* | | | Ensure ApplicationSetting#performance_bar_allowed_group_id is properly set ↵Rémy Coutable2018-05-291-34/+5
| |_|/ |/| | | | | | | | | | | | | | when retrieved from cache Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch 'ab-45389-remove-double-checked-internal-id-generation' into ↵Yorick Peterse2018-05-281-20/+4
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | 'master' Remove double-checked internal id generation. Closes #45389 See merge request gitlab-org/gitlab-ce!19181
| * | Remove double-checked internal id generation.Andreas Brandl2018-05-281-20/+4
| | | | | | | | | | | | | | | | | | This was needed for a transition phase only. For details see #45389. Closes #45389.
* | | Merge branch '45190-create-notes-diff-files' into 'master'Douwe Maan2018-05-285-22/+72
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Persist and use truncated note diffs instead requesting Gitaly in a N+1 manner on MR page Closes #45190 See merge request gitlab-org/gitlab-ce!18991
| * | Persist truncated note diffs on a new table45190-create-notes-diff-filesOswaldo Ferreira2018-05-245-22/+72
| | | | | | | | | | | | | | | We request Gitaly in a N+1 manner to build discussion diffs. Once the diffs are from different revisions, it's hard to make a single request to the service in order to build the whole response. With this change we solve this problem and simplify a lot fetching this piece of info.
* | | Merge branch '46600-fix-gitlab-revision-when-not-in-git-repo' into 'master'Rémy Coutable2018-05-251-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Resolve "gitlab 10.8 assumes that installation is a git working copy." Closes #46600 See merge request gitlab-org/gitlab-ce!19125
| * | Replace Gitlab::REVISION with Gitlab.revision and handle installations ↵46600-fix-gitlab-revision-when-not-in-git-repoRémy Coutable2018-05-241-1/+1
| |/ | | | | | | | | | | without a .git directory Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch 'issue_38418' into 'master'Rémy Coutable2018-05-241-2/+2
|\ \ | | | | | | | | | | | | | | | | | | Fix sidebar issue count Closes #38418 See merge request gitlab-org/gitlab-ce!19022
| * | Fix sidebar issue countissue_38418Felipe Artur2018-05-241-2/+2
| | |
* | | Merge branch 'mr-conflict-notification' into 'master'Douwe Maan2018-05-242-5/+26
|\ \ \ | | | | | | | | | | | | | | | | MR unmergeable notification See merge request gitlab-org/gitlab-ce!18042
| * | | Avoid race condition of re-triggering mark_as_uncheckedMark Chao2018-05-181-2/+2
| | | |
| * | | Create TODO when MR became unmergeablelulalala2018-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old behavior of creating TODO when “Merge When Pipeline Succeeds” service fails, is generalized to: Create a TODO whenever MR became unmergeable (and similar to notification, MR author and merge_user are both applicable)
| * | | Notify with email when merge request became unmergeablelulalala2018-05-171-0/+4
| | | | | | | | | | | | | | | | Display MR unmergeable reasons
| * | | Add MergeRequest#merge_participantslulalala2018-05-171-0/+10
| | | | | | | | | | | | For notifying via todo or email.
| * | | Add cannot_be_merged_recheck merge_statuslulalala2018-05-172-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, transitions between can_be_merged & cannot_be_merged are removed, as they are currently blocked in `check_if_can_be_merged`. `can_be_merge` always returns to `unchecked` first, before it can transition to `cannot_be_merged` (and vice versa). We want to avoid repeated notification triggered by repeated transition between `cannot_be_merged` & `unchecked`. So we added `cannot_be_merged_recheck` state, similar to `unchecked`, but as a mean to remember it’s from cannot_be_merged. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18042/#note_65945407 Since `unchecked` and `cannot_be_merged_recheck` both mean “we are in the middle of checking if it is mergeable”, quite often we need to see if merge_status is in either one of them, so `check_state?` is added to achieve this.
* | | | Merge branch 'jprovazn-fix-resolvable' into 'master'Douwe Maan2018-05-241-1/+1
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | Check if note's noteable is not nil when checking resolvability Closes #46573 See merge request gitlab-org/gitlab-ce!19081
| * | | Check if note's noteable is not nil when checking resolvabilityjprovazn-fix-resolvableJan Provaznik2018-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | This can occur when a note is added to a commit and then this commit is deleted.
* | | | Use the new CacheableAttributes concern in the ApplicationSetting and ↵Rémy Coutable2018-05-232-46/+5
| | | | | | | | | | | | | | | | | | | | | | | | Appearance models Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | Introduce a new CacheableAttributes concernRémy Coutable2018-05-231-0/+54
| | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | Resolve "Deprecate Gemnasium project service"Olivier Gonzalez2018-05-232-1/+13
| | | |
* | | | Merge branch 'dm-xcode-project-directory' into 'master'Robert Speicher2018-05-221-5/+15
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix Xcode project detection by looking for dirs instead of files See merge request gitlab-org/gitlab-ce!19035
| * | | | Fix Xcode project detection by looking for dirs instead of filesdm-xcode-project-directoryDouwe Maan2018-05-221-5/+15
| | | | |
* | | | | Merge branch ↵Douwe Maan2018-05-221-8/+19
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '22846-notifications-broken-during-email-address-change-before-email-confirmed' into 'master' Resolve "notifications broken during email address change before email confirmed" Closes #22846 See merge request gitlab-org/gitlab-ce!18474
| * | | | | Don't set the notification_email when only unconfirmed_email is changed22846-notifications-broken-during-email-address-change-before-email-confirmedRémy Coutable2018-05-221-8/+19
| | |/ / / | |/| | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | Merge branch 'ab-43706-composite-primary-keys' into 'master'Yorick Peterse2018-05-221-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migration to add primary key constraint for composite keys Closes #43706 and #32258 See merge request gitlab-org/gitlab-ce!18980
| * | | | | Add NOT NULL constraints to project_authorizations.Andreas Brandl2018-05-211-1/+1
| |/ / / / | | | | | | | | | | | | | | | Closes #32258.
* | | | | Expose readme url in Project APIImre Farkas2018-05-221-0/+7
|/ / / /
* | | | Merge branch 'fix/gb/exclude-persisted-variables-from-environment-name' into ↵Grzegorz Bizon2018-05-212-1/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Do not allow to use `CI_PIPELINE_ID` in environment name Closes #46443 See merge request gitlab-org/gitlab-ce!19032
| * | | | Separate persisted and runtime pipeline variablesGrzegorz Bizon2018-05-182-1/+2
| | | | |
| * | | | Do not allow to use `CI_PIPELINE_ID` in environment nameGrzegorz Bizon2018-05-181-2/+7
| |/ / /
* | | | Merge branch '46082-runner-contacted_at-is-not-always-a-time-type' into 'master'Kamil Trzciński2018-05-212-3/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Runner#contacted_at is not always a Time type" Closes #46082 See merge request gitlab-org/gitlab-ce!18810
| * | | | Revert "Improve cacheable module"46082-runner-contacted_at-is-not-always-a-time-typeMatija Čupić2018-05-181-7/+5
| | | | | | | | | | | | | | | This reverts commit 2ebafdfb2f026580153fd2cf50f4b6b7ab3a0344
| * | | | Improve cacheable moduleKamil Trzciński2018-05-181-5/+7
| | | | |
| * | | | Include class name and argument name in argument errorMatija Čupić2018-05-171-1/+3
| | | | |
| * | | | Use Gitlab.rails5? for checking if on rails5Matija Čupić2018-05-171-3/+3
| | | | |