summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Handle LFS token creation and retrieval in the same method, and in the same ↵lfs-ssh-authorization-fixPatricio Cano2016-09-283-14/+11
| | | | | | Redis connection. Reset expiry time of token, if token is retrieved again before it expires.
* Do not regenerate the `lfs_token` every time `git-lfs-authenticate` is ↵Patricio Cano2016-09-271-0/+2
| | | | called, instead return the saved token if one is present.
* fix model order in import/export config and 1to1 relation issue. Added ↵James Lopez2016-09-272-4/+10
| | | | relevant specs.
* Merge branch 'dz-profile-organization' into 'master' Dmitriy Zaporozhets2016-09-272-3/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add organization field to the user profile ## What does this MR do? Add organization field to the user profile ## Are there points in the code the reviewer needs to double check? no ## Why was this MR needed? So we can let users fill organization information separately ## Screenshots (if relevant) ![Screen_Shot_2016-09-26_at_7.32.27_PM](/uploads/d11a9a86aa22227f9c9915d195106c5f/Screen_Shot_2016-09-26_at_7.32.27_PM.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] ~~[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 - [x] All builds are passing - [x] 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) - [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) ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/21903 See merge request !6526
| * Add User#organization to users apiDmitriy Zaporozhets2016-09-272-3/+5
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Merge branch 'rc-new-members-approve-request-access-service' into 'master' Douwe Maan2016-09-271-6/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New `Members::ApproveAccessRequestService` Part of #21979. ## Does this MR meet the acceptance criteria? - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] 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 !6266
| * New Members::ApproveAccessRequestServiceRémy Coutable2016-09-221-6/+1
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch 'api-alphabetical' into 'master' Rémy Coutable2016-09-261-1/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Keep API mounts in alphabetical order ## What does this MR do? Just a cosmetic change to keep the API mounts in order. See merge request !6515
| * | Keep API mounts in alphabetical orderAchilleas Pipinellis2016-09-251-1/+2
| | |
* | | Fixes issue with rails reserved keyword type exporting/importing services. ↵James Lopez2016-09-261-0/+2
| | | | | | | | | | | | Also fixed CustomIssueTrackerService title setter and added relevant specs.
* | | Merge branch '22229-use-base-sha-when-downloading-merge-requests' into 'master' Robert Speicher2016-09-251-6/+6
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use base SHA for patches and diffs ## What does this MR do? Switch from using 'start SHA' to 'base SHA' for patches and diffs ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? Makes the downloaded patches and diffs on the merge request page match the frontend-rendered "changes" in these scenarios: * Unpatched gitlab-workhorse, downloading patchsets of open MRs (https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/68) * Unpatched gitlab-workhorse, downloading diffs of open and merged MRs * Patched gitlab-workhorse, downloading patchsets of merged merge requests ## What are the relevant issue numbers? Closes #22229 See merge request !6435
| * | Use base SHA for patches and diffsNick Thomas2016-09-221-6/+6
| | | | | | | | | | | | | | | | | | | | | This commit changes the revisions used for diffs. The current behaviour is to show all changes between current tip of master and tip of the MR, rather than matching the output of the web frontend (which just shows the changes in the MR). Switching from start_sha to base_sha fixes this.
* | | Merge branch 'fix/memory-leak-sanitization-filter' into 'master' Yorick Peterse2016-09-231-32/+32
|\ \ \ | | | | | | | | | | | | | | | | Fix a memory leak in HTML::Pipeline::SanitizationFilter::WHITELIST See merge request !6456
| * | | Fix the leak mentioned in 504a3b5 by another wayAhmad Sherif2016-09-231-29/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous fix introduced another leak; as it made Banzai::Filter::SanitizationFiler#customized? always return false, so we were always appending two elements to HTML::Pipeline::SanitizationFilter::WHITELIST[:elements]. This growth in the elements array would slow the sanitization process over time.
| * | | Revert "Fix a memory leak caused by Banzai::Filter::SanitizationFilter"Ahmad Sherif2016-09-231-3/+1
| | | | | | | | | | | | | | | | This reverts commit 504a3b5e6f0b2e2957cf1e4d9d8eebbf32234bdb.
* | | | Merge branch 'fix/database-seeds' into 'master' Rémy Coutable2016-09-231-3/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix database seeds for development environment ## What does this MR do? This MR fixes database seeds for development environment and adds CI test for it. ## Why was this MR needed? Database seeds for development environment are often broken, and we are not able to catch that when someone modified `db/fixtures` and forgets to reseed database. Closes #22422 See merge request !6475
| * | | Remove use of `USE_DB` environment variable in codefix/database-seedsGrzegorz Bizon2016-09-231-3/+1
| | | |
| * | | Update `CurrentSettings` class that uses ENVGrzegorz Bizon2016-09-221-1/+1
| | | |
* | | | Merge branch 'redis-config-mutation' into 'master' Robert Speicher2016-09-231-12/+19
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Make Gitlab::Redis.params safe for mutation Would have avoided https://gitlab.com/gitlab-com/infrastructure/issues/464 Defends in depth against programming mistakes. See merge request !6472
| * | | Make Gitlab::Redis.params safe for mutationJacob Vosmaer2016-09-221-12/+19
| |/ /
* | | API: Return 404 when trying to fork to unaccessible namespaceRémy Coutable2016-09-221-1/+3
|/ / | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | fix import/export security specs after mergeJames Lopez2016-09-211-0/+3
| |
* | Merge branch 'and-you-get-awards' into 'master' Rémy Coutable2016-09-211-12/+17
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And Snippets get awards ## What does this MR do? Makes snippets more awesome, by making them awardables ## Why was this MR needed? Because Snippets were left behind. ## What are the relevant issue numbers? Closes #17878 See merge request !4456
| * | Fix tests for Snippets toggling awardsZ.J. van de Weg2016-09-191-14/+9
| | | | | | | | | | | | Also incorporate feedback
| * | API support for Award Emoji on SnippetsZ.J. van de Weg2016-09-191-10/+20
| | |
| * | Snippets get award emoji! :thumbsup:Z.J. van de Weg2016-09-191-1/+1
| | |
* | | Merge branch 'add_spec_for_committer_hash' into 'master' Rémy Coutable2016-09-211-0/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add spec covering 'committer_hash' Adds a missing spec from changes added in !5822 See merge request !6433
| * | | Add spec covering 'committer_hash'Dan Dunckel2016-09-201-0/+2
| | |/ | |/|
* | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2016-09-2131-164/+632
|\ \ \
| * \ \ Merge branch 'post-merge-improve-of-ci-permissions' into 'master' Rémy Coutable2016-09-211-2/+3
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Post-merge improve of CI permissions Improves code from !6409 See merge request !6432
| | * | | Improve JwtController implementationpost-merge-improve-of-ci-permissionsKamil Trzcinski2016-09-201-1/+2
| | | | |
| | * | | Post-merge improve of CI permissionsKamil Trzcinski2016-09-201-3/+3
| | | | |
| * | | | Merge branch '21170-cycle-analytics' into 'master' Stan Hu2016-09-212-0/+139
| |\ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cycle Analytics: first iteration ## What does this MR do? - Implement the first iteration of the "Cycle Analytics" feature. ## What are the relevant issue numbers? - Closes #21170 ## Screenshots ![cycle_analytics_screencast.gif](/uploads/d23c3c912caa6935fd47b53ca3a56b97/cycle_analytics.gif) ## Backend Tasks - [x] Implementation - [x] Phases - [x] Issue (Tracker) - [x] Plan (Board) - [x] Code (IDE) - [x] Test (CI) - [x] Review (MR) - [x] Staging (CD) - [x] Production (Total) - [x] Make heuristics more modular - [x] Scope to project - [x] Date range (30 days, 90 days) - [x] Access restriction - [x] Test - [x] Find a better way to test these phases - [x] Phases - [x] Issue (Tracker) - [x] Plan (Board) - [x] Code (IDE) - [x] Test (CI) - [x] Review (MR) - [x] Staging (CD) - [x] Production (Total) - [x] Test for "end case happens before start case" - [x] Consolidate helper - [x] Miniboss review - [x] Performance testing with mock data - [x] Improve performance - [x] Pre-calculate "merge requests closing issues - [x] Pre-calculate everything else - [x] Test performance against 10k issues - [x] Test all pre-calculation code - [x] Ci::Pipeline -> build start/finish - [x] Ci::Pipeline#merge_requests - [x] Issue -> record default metrics after save - [x] MergeRequest -> record default metrics after save - [x] Deployment -> Update "first_deployed_to_production_at" for MR metrics - [x] Git Push -> Update "first commit mention" for issue metrics - [x] Merge request create/update/refresh -> Update "merge requests closing issues" - [x] Remove `MergeRequestsClosingIssues` when necessary - [x] Changes to unblock Fatih - [x] Add summary data - [x] `stats` should be array - [x] Let `stats` be `null` if all `stats` are null - [x] Indexes for "merge requests closing issues" - [x] Test summary data - [x] Scope everything to project - [x] Find out why tests were passing - [x] Filter should include issues/MRs which have made it to production within the range - [x] Don't create duplicate `MergeRequestsClosingIssues` - [x] Fix tests - [x] MySQL median - [x] Assign to Douwe for review - [x] Fix conflicts - [x] Implement suggestions from Yorick's review - [x] Test on PG - [x] Test on MySQL - [x] Refactor - [x] Cleanup - [x] What happens if we have no data at all? - [x] Extract common queries to methods / scopes - [x] Remove unused queries - [x] Downtime for foreign key migrations - [x] Find a way around "if issue.metrics.present?" all over the place - [x] Find a way around "if merge_request.metrics.present?" all over the place - [x] Test migrations on a fresh database - [x] MySQL - [x] Pg - [x] Access issues - While the project is public and the visibility is set to "Everyone with access", you cannot visit the cycle analytics page when signed out. - [x] CHANGELOG - [x] Implement suggestions from Douwe's review - [x] First set of comments - [x] Second set of comments - [x] Third set of comments - [x] Fourth set of comments - [x] Make sure build is green - [ ] Make issue for "polish" - [ ] EE MR See merge request !5986
| | * | | Implement fourth round of comments from @DouweM.Timothy Andrew2016-09-212-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Pluralize summary titles - Remove the `run_query` method - always return sql strings from the `date_time_sql` methods
| | * | | Improve indentation in `Gitlab::Database::Median`Timothy Andrew2016-09-211-11/+18
| | | | |
| | * | | Implement a second round of review comments from @DouweM.Timothy Andrew2016-09-212-14/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't use `TableReferences` - using `.arel_table` is shorter! - Move some database-related code to `Gitlab::Database` - Remove the `MergeRequest#issues_closed` and `Issue#closed_by_merge_requests` associations. They were either shadowing or were too similar to existing methods. They are not being used anywhere, so it's better to remove them to reduce confusion. - Use Rails 3-style validations - Index for `MergeRequest::Metrics#first_deployed_to_production_at` - Only include `CycleAnalyticsHelpers::TestGeneration` for specs that need it. - Other minor refactorings.
| | * | | Fix rubocop spec.Timothy Andrew2016-09-201-6/+5
| | | | | | | | | | | | | | | | | | | | And `scss_lint`
| | * | | Implement (some) comments from @DouweM's review.Timothy Andrew2016-09-202-21/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move things common to `Issue` and `MergeRequest` into `Issuable` - Move more database-specific functions into `Gitlab::Database` - Indentation changes and other minor refactorings.
| | * | | Implement review comments from @yorickpeterseTimothy Andrew2016-09-201-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Change multiple updates to a single `update_all` 2. Use cascading deletes 3. Extract an average function for the database median. 4. Move database median to `lib/gitlab/database` 5. Use `delete_all` instead of `destroy_all` 6. Minor refactoring
| * | | | Merge branch 'add_optional_author_for_commits' into 'master' Rémy Coutable2016-09-202-5/+15
| |\ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add optional 'author' param when making commits This fulfills https://gitlab.com/gitlab-org/gitlab-ce/issues/20789 by adding the ability to specify a user's ID to be used as the author of a commit. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/20789 See merge request !5822
| | * | | Add optional 'author' param when making commitsDan Dunckel2016-09-192-5/+15
| | | |/ | | |/|
| * | | Merge branch 'feature/github-edit-path' into 'master' Rémy Coutable2016-09-201-3/+4
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lets the user choose a namespace and name on Github imports Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/14971 See merge request !5728
| | * | | modify github import JS and controller so we can now specify a namespace ↵James Lopez2016-09-201-3/+4
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | and/or name for a project. - Fixed and added specs. - Added different namespace options depending on user privilages - Updated docs.
| * | | Merge branch 'lfs-support-for-ssh-enabled' into 'master' Douwe Maan2016-09-204-2/+102
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LFS support for ssh enabled ## What does this MR do? This is follow-up after https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6043 which is falsely shown as merged due to: https://gitlab.com/gitlab-org/gitlab-ce/issues/22334 ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [ ] [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) - [ ] API support added - Tests - [ ] 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) - [ ] 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) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? See merge request !6413
| | * | Move logic to check ci? or lfs_deploy_token? to Gitlab::Auth::ResultKamil Trzcinski2016-09-201-4/+8
| | | |
| | * | Use early return in lfs_token_checkKamil Trzcinski2016-09-201-10/+10
| | | |
| | * | Revert "Revert all changes introduced by ↵lfs-supportKamil Trzcinski2016-09-194-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6043" This reverts commit 6d43c95b7011ec7ec4600e00bdc8df76bb39813c.
| * | | Merge branch 'rs-trailing-spaces-in-regex-messages' into 'master' Rémy Coutable2016-09-201-3/+3
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Remove trailing spaces from messages in Gitlab::Regex See merge request !6426
| | * | | Remove trailing spaces from messages in Gitlab::Regexrs-trailing-spaces-in-regex-messagesRobert Speicher2016-09-201-3/+3
| | | |/ | | |/|
| * | | Merge branch 'ldap_user_attr_method' into 'master' Douwe Maan2016-09-201-1/+5
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move LDAP user attributes to a method ## What does this MR do? This is a change that supports an EE fix. This small change needs to be made in CE to prevent future merge conflicts. See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/736 for the EE changes. See merge request !6377