summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'gh-branch-cleanup' into 'master' Douwe Maan2016-06-031-2/+2
|\ | | | | | | | | | | | | | | Ensure branch cleanup regardless of whether the GitHub import process succeeds Closes #17766 See merge request !4450
| * Ensure branch cleanup regardless of whether the import process succeedsgh-branch-cleanupDouglas Barbosa Alexandre2016-06-021-2/+2
| |
* | Merge branch '14139-sha-parameter-in-accept-merge-request-api' into 'master' Douwe Maan2016-06-031-0/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "SHA parameter in accept merge request API" Add a `sha` parameter to the MR merge API, which must match the source SHA for the branch to be merged. Also add the same parameter to the UI: ![MR_SHA](/uploads/616da728695dc19fa7ef7ef6a016ff81/MR_SHA.gif) @DouweM and I discussed adding some smart feature to that, like updating the source SHA on navigating to the diff tab, but for now it will just require a refresh :smiley: Closes #14139. See merge request !4414
| * | fixup! Add `sha` parameter to MR accept APISean McGivern2016-06-021-1/+1
| | |
| * | Add `sha` parameter to MR accept APISean McGivern2016-06-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The `sha` parameter is optional, and when present, must match the current HEAD SHA of the source branch. Otherwise, the API call fails with a 409 Conflict and a message containing the current HEAD for the source branch. Also tidy up some doc wording.
* | | Merge branch 'banzai-user-filter-queries'Douwe Maan2016-06-032-2/+34
|\ \ \ | |_|/ |/| |
| * | Reduce Namespace queries in UserReferenceFilterbanzai-user-filter-queriesYorick Peterse2016-06-021-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes UserReferenceFilter so it operates using the following steps: 1. Grab all username references from the input document. 2. Query the corresponding Namespace objects using a single query. 3. Iterate over all nodes to build links while re-using the objects queried in step 2. The impact of these changes is that a comment mentioning 5 different usernames no longer runs 5 different queries (1 for every username), instead it only runs a single query.
| * | Added ReferenceFilter#nodesYorick Peterse2016-06-021-0/+5
| | | | | | | | | | | | | | | | | | This method returns an Array of the HTML nodes as yielded by ReferenceFilter#each_node. The method's return value is memoized to allow multiple calls without having to re-query the input document.
| * | Returning enums in ReferenceFilter#each_nodeYorick Peterse2016-06-021-0/+2
| |/ | | | | | | | | This changes ReferenceFilter#each_node so that when it's called without a block an Enumerator is returned.
* | Fix serious performance bug with rendering Markdown with InlineDiffFilterStan Hu2016-06-011-4/+8
|/ | | | | | | | | Nokogiri's `node.replace` was being unnecessarily called for every text node in the document due to a comparison bug. The code previously was comparing the HTML representation of the full document against the text node, which would always fail. Fix the comparison to just compare the modified text. Closes #18011
* Merge branch 'style/enable-semicolon-rubocop-cop' into 'master' Robert Speicher2016-06-011-1/+1
|\ | | | | | | | | | | | | | | | | Enable Style/Semicolon rubocop style cop Don't use semicolons to terminate expressions. See #17478. See merge request !4351
| * Enable Style/Semicolon rubocop style copstyle/enable-semicolon-rubocop-copGrzegorz Bizon2016-06-011-1/+1
| | | | | | | | See #17478
* | Merge branch 'separate-banzai-references' into 'master' Douwe Maan2016-06-0129-276/+596
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Separate reference gathering from rendering This is a required step to allow batch processing when gathering references. This in turn would allow grabbing (for example) all mentioned users of an issue/merge request using a single query. cc @rspeicher @DouweM See merge request !3969
| * | Split Markdown rendering & reference gatheringYorick Peterse2016-05-2628-276/+562
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This splits the Markdown rendering and reference extraction phases into two distinct code bases. The reference extraction phase no longer relies on the html-pipeline Gem (and any related code) and allows for extracting of references from multiple HTML nodes in a single pass. This means that if you want to extract user references from 200 comments you no longer need to run 200 times N number of queries, instead only a handful of queries may be needed.
| * | Added Gitlab::LazyYorick Peterse2016-05-261-0/+34
| | | | | | | | | | | | | | | | | | | | | This class can be used to lazy-evaluate blocks of code the first time they're called. This can be useful when a method performs a certain heavy operation (e.g. a SQL query) that you only want to perform whenever the result is used for the first time.
* | | Merge branch 'current-settings-use-request-store-during-request'Douwe Maan2016-06-011-9/+13
|\ \ \
| * | | Try and use cache for application settings even when the db is not connectedcurrent-settings-use-request-store-during-requestDJ Mountney2016-05-291-2/+2
| | | |
| * | | Only use RequestStore for current_application_settings during a requestDJ Mountney2016-05-271-9/+13
| | | | | | | | | | | | | | | | | | | | This fixes an issue where the RequestStore was being populated with the settings in the unicorn master during the rails initializers. Each forked worker would then start their first request with an uncleaned RequestStore.
* | | | Merge branch 'fix-404-labels-in-todos' into 'master' Douwe Maan2016-06-011-1/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix 404 page when viewing TODOs that contain milestones or labels in different projects A user viewing the TODOs page will see a 404 if there are mentioned milestones or labels in multiple different projects. This is likely a caching bug and only occurs when Markdown rendering occurs across multiple projects, which is why it's so tricky to reproduce. This is what I think is happening: 1. LabelReferenceFilter#references_in encounters label ~X for ProjectA and finds the label in the DB as id = 1. 2. LabelReferenceFilter.references_in yields [1, 'X', nil, ...] 3. Since project_ref is nil, AbstractReferenceFilter#project_from_ref_cache caches nil => ProjectA. 4. LabelReferenceFilter#references_in encounters label ~Y for ProjectB and finds the label in the DB as id = 2. 5. LabelReferenceFilter.references_in yields [2, 'Y', nil, ...] 6. AbstractReferenceFilter#project_from_ref_cache lookups nil and returns ProjectA. It was supposed to be ProjectB. 7. A is the wrong project, so the label lookup fails. This MR expands the `project_ref` to the right value as soon as we have it to avoid this caching bug. Closes #17898 See merge request !4312
| * | | | Fix 404 page when viewing TODOs that contain milestones or labels in ↵Stan Hu2016-05-311-1/+3
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | different projects A user viewing the TODOs page will see a 404 if there are mentioned labels in multiple different projects. This is likely a caching bug and only occurs when Markdown rendering occurs across multiple projects, which is why it's so tricky to reproduce. This is what I think is happening: 1. LabelReferenceFilter#references_in encounters label ~X for ProjectA and finds the label in the DB as id = 1. 2. LabelReferenceFilter.references_in yields [1, 'X', nil, ...] 3. Since project_ref is nil, AbstractReferenceFilter#project_from_ref_cache caches nil => ProjectA. 4. LabelReferenceFilter#references_in encounters label ~Y for ProjectB and finds the label in the DB as id = 2. 5. LabelReferenceFilter.references_in yields [2, 'Y', nil, ...] 6. AbstractReferenceFilter#project_from_ref_cache lookups nil and returns ProjectA. It was supposed to be ProjectB. 7. A is the wrong project, so the label lookup fails. This MR caches Markdown references if the key is present. Closes #17898
* | | | Merge branch 'issue_15557' into 'master' Rémy Coutable2016-06-012-8/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error 500 when sorting issues by milestone due date and filtering by labels fixes #15557 See merge request !4327
| * | | | Add leading comment space copissue_15557Felipe Artur2016-05-313-9/+9
| | |/ / | |/| |
* | | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2016-06-013-1/+3
|\ \ \ \ | | |/ / | |/| |
| * | | Create the specified remote directory during backuprs-create-remote-backup-folderRobert Speicher2016-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is idempotent, so there's no harm calling it if the directory already exists. Closes #12710
| * | | Add Application Setting to configure Container Registry token expire delay ↵Kamil Trzcinski2016-05-312-0/+2
| | | | | | | | | | | | | | | | (default 5min)
* | | | Merge branch 'data_leak' into 'master' Robert Speicher2016-05-311-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Confidential notes data leak Fixes part of https://gitlab.com/gitlab-org/gitlab-ee/issues/575 See merge request !1967
| * | | Confidential notes data leakValery Sizov2016-05-311-1/+1
| |/ /
* | | Merge branch 'rubocop/enable-negatedif-style-cop' into 'master' Robert Speicher2016-05-301-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/NegatedIf Rubocop cop Favor `unless` over `if` for negative conditions (or control flow ||). ```ruby # bad do_something if !some_condition # bad do_something if not some_condition # good do_something unless some_condition # good some_condition || do_something ``` See #17478 See merge request !4355
| * | | Enable Style/NegatedIf Rubocop coprubocop/enable-negatedif-style-copGrzegorz Bizon2016-05-301-1/+1
| |/ / | | | | | | | | | | | | | | | | | | Favor `unless` over `if` for negative conditions (or control flow ||). See #17478
* | | Merge branch 'rubocop/enable-literal-in-condition-cop' into 'master' Robert Speicher2016-05-301-3/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Lint/LiteralInCondition rubocop cop Detects literals used in conditions. See #17478 See merge request !4354
| * | | Enable Lint/LiteralInCondition rubocop coprubocop/enable-literal-in-condition-copGrzegorz Bizon2016-05-301-3/+2
| |/ / | | | | | | | | | | | | | | | Checks of literals used in conditions. See #17478
* | | Merge branch 'style/enable-rubocop-indent-assignment-cop' into 'master' Robert Speicher2016-05-301-7/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/IndentAssignment Rubocop style cop Checks the indentation of the first line of the right-hand-side of a multi-line assignment. See #17478 See merge request !4348
| * | | Enable Style/IndentAssignment Rubocop style copstyle/enable-rubocop-indent-assignment-copGrzegorz Bizon2016-05-301-7/+7
| |/ / | | | | | | | | | See #17478
* | | Merge branch 'style/enable-while-until-do-rubocop-style-cop' into 'master' Robert Speicher2016-05-301-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/WhileUntilDo rubocop style cop Checks for redundant `do` after `while` or `until`. See #17478 See merge request !4350
| * | | Enable Style/WhileUntilDo rubocop style copstyle/enable-while-until-do-rubocop-style-copGrzegorz Bizon2016-05-301-1/+1
| |/ / | | | | | | | | | See #17478
* | | Merge branch 'rubocop/enable-redundant-parentheses-cop' into 'master' Robert Speicher2016-05-301-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/RedundantParentheses rubocop cop Checks for parentheses that seem not to serve any purpose. See #17478 See merge request !4361
| * | | Enable Style/RedundantParentheses rubocop coprubocop/enable-redundant-parentheses-copGrzegorz Bizon2016-05-301-1/+1
| |/ / | | | | | | | | | See #17478
* | | Enable Style/SpaceBeforeComment rubocop coprubocop/enable-space-before-comment-copGrzegorz Bizon2016-05-301-1/+1
|/ / | | | | | | See #17478
* | Merge branch 'fix/gitlab-importer-issue' into 'master' Robert Speicher2016-05-261-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix gitlab importer issue Fixed credentials not being called correctly - probably some bad refactoring or search & replace... Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/565 See merge request !4301
| * | fix bad refactoring of import data credentialsJames Lopez2016-05-261-3/+3
| |/
* | Merge branch 'measure-proxy-timing' into 'master' Yorick Peterse2016-05-261-0/+24
|\ \ | |/ |/| | | | | Measure proxy flight time See merge request !4278
| * Rename metric to 'rails queue duration'Jacob Vosmaer2016-05-261-2/+2
| |
| * Align class name with field nameJacob Vosmaer2016-05-251-1/+1
| |
| * Send data to InfluxDB instead of stdoutJacob Vosmaer2016-05-251-4/+6
| |
| * Measure proxy timing: needs influxdb codeJacob Vosmaer2016-05-241-0/+22
| |
* | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2016-05-263-2/+9
|\ \
| * \ Merge branch 'updated-contrib-calendar' into 'master' Jacob Schatz2016-05-251-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POC: Updated contrib calendar In an effort to cut down the JS file size - i've removed the heatmap calendar used for the contributing calendar on users profiles. We already have d3 on the page so why not use it instead of using a library which uses it? ![Screen_Shot_2016-04-27_at_11.08.41](/uploads/64c40f0c766f800fd0e33ac8be7f9644/Screen_Shot_2016-04-27_at_11.08.41.png) cc. @jschatz1 See merge request !3944
| | * | Group the contributing calendar by dayPhil Hughes2016-05-161-1/+1
| | | | | | | | | | | | | | | | This aligns the boxes correctly with the day on the left side of the calendar
| * | | Merge branch 'fix/import-url-uri-issue' into 'master' Douwe Maan2016-05-251-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for import URL URI problem when URL contains a space Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/17559 Prevents an already encoded URL to be encoded again - preventing %20 => %25%20 See merge request !4180
| | * | | fix changelog and mergefix/import-url-uri-issueJames Lopez2016-05-231-1/+1
| | | | |