Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-12Fix reference filters in group contextJan Provaznik
Since !18150 abstract reference filter supports also `group` as a resource parent (not only `project`). Some reference filters, which inherit from abstract filter, depend on parent being `project` when checking a reference. This patch adds explicit check of parent class to the given filters.
2018-04-06Merge branch '17939-osw-patch-support-gfm' into 'master'Sean McGivern
Add support for patch link extension for commit links on GFM Closes #17939 See merge request gitlab-org/gitlab-ce!18229
2018-04-06Add support for patch link extension for commit links on GFMOswaldo Ferreira
2018-04-05Better group support notes-related codeJan Provaznik
Updates notes-related services and rendering so this code can be easily used for group-scoped resources (specifically Epics). Related to gitlab-ee!5205
2018-04-04Render MR commit SHA instead "diffs" when viableOswaldo Ferreira
2018-02-27Keep link when redacting unauthorized object linksOswaldo Ferreira
2017-12-06Refactor banzai to support referencing from group contextJarka Kadlecova
2017-11-23Fix link text from group contextJarka Kadlecova
2017-11-06Resolve "DashboardController#activity.json is slow due to SQL"Francisco Javier López
2017-11-02CE port of code changed for epicsJarka Kadlecova
2017-08-07DRY up caching in AbstractReferenceFilterSean McGivern
We had a lot of copied and pasted code, when the different elements were very small and easy to get wrong.
2017-08-07Support references to group milestonesSean McGivern
Group milestones can only be referred to by name, not IID. They also do not support cross-project references.
2017-08-01Rename many path_with_namespace -> full_pathGabriel Mazetto
2017-06-30Improve support for external issue referencesAdam Niedzielski
2017-03-17Use Enumerable#index_by where possibleDouwe Maan
2017-02-23Fix code for copsDouwe Maan
2017-02-23Enable Style/ConditionalAssignmentDouwe Maan
2017-02-16Only yield valid references in ReferenceFilter.references_inDouwe Maan
2017-02-13Add GFM support to nested groupsDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-01-17Copying a rendered issue/comment will paste into GFM textareas as actual GFMDouwe Maan
2016-12-22Use `ref` variableDouwe Maan
2016-12-22Fix lookup of project by unknown ref when caching is enabledDouwe Maan
2016-12-11Rename Routable.where_paths_in to Routable.where_full_path_inDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-12-03Add shorthand support to gitlab markdown referencesOswaldo Ferreira
2016-11-01Fix Markdown styling inside reference linkspanjan
Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/18096
2016-10-19Prevent wrong markdown on issue ids when project has Jira service activatedFelipe Artur
2016-09-28AbstractReferenceFilter caches current project_ref on RequestStore when activePaco Guzman
Before we weren’t caching current_project_ref because normally the reference to the current project doesn’t include the path with namespace. But now we store the current project in the projects reference cache to be used for the same filter when accessing using path with namespace of for subsequent filters executed on the cache.
2016-09-01Use JavaScript tooltips for mentions (!5301)winniehell
2016-06-30Handle external issues in IssueReferenceFilterYorick Peterse
IssueReferenceFilter will end up processing internal issue references when a project uses an external issues tracker while still using internal issue references (in the form of `#\d+`). This commit ensures that these links are rendered as external issue links, regardless of whether the project one currently views uses an internal or external issues tracker. Fixes gitlab-org/gitlab-ce#19036, gitlab-com/performance#16
2016-06-18Fix RangeError exceptions when referring to issues or merge requests outside ↵Stan Hu
of max database values When using #XYZ in Markdown text, if XYZ exceeds the maximum value of a signed 32-bit integer, we get an exception when the Markdown render attempts to run `where(iids: XYZ)`. Introduce a method that will throw out out-of-bounds values. Closes #18777
2016-06-16Reduce queries in IssueReferenceFilterYorick Peterse
This reduces the number of queries executed in IssueReferenceFilter by retrieving the various projects/issues that may be referenced in batches _before_ iterating over all the HTML nodes. A chunk of the logic resides in AbstractReferenceFilter so it can be re-used by other filters in the future.
2016-06-01Merge branch 'separate-banzai-references' into 'master' Douwe Maan
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
2016-06-01Fix 404 page when viewing TODOs that contain milestones or labels in ↵Stan Hu
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
2016-05-26Split Markdown rendering & reference gatheringYorick Peterse
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.
2016-04-06Fix header link rendering when containing numbersYorick Peterse
This fixes the problem where Markdown such as: ### 31st Would get rendered as a link tag pointing to issue number 31 inside a header tag. See gitlab-org/gitlab-ce#14936 for more information.
2016-04-04Cleaned up caching in AbstractReferenceFilterYorick Peterse
Cleaning this up any further is a bit tricky as the caches in question should only be evaluated if RequestStore is actually enabled.
2016-04-04Memoize object class titlesYorick Peterse
For an issue with around 200 notes this cuts down timings by around 150 milliseconds.
2016-04-04Cache Banzai class methods returning static dataYorick Peterse
These methods always return the same data for every class so there's no point in computing their values on every call.
2016-04-04Refactor processing of various Banzai filtersYorick Peterse
These filters now use a single iteration over all the document nodes instead of multiple ones. This in turn allows variables to be re-used (e.g. links only have to be unescaped once). Combined with some other refactoring this can drastically reduce render timings.
2016-04-04Cache Banzai projects/objects using RequestStoreYorick Peterse
This was originally suggested by @ayufan and modified to be a bit cleaner and use RequestStore instead of a regular Hash. By caching the output of the two methods involved the number of queries is reduced significantly. For example, for an issue with 200 notes (of which 100 reference a number of merge requests) this cuts down the amount of queries from around 6300 to around 3300.
2016-03-03Fix bug with return value in abstract reference filterGrzegorz Bizon
When `object_class.link_reference_pattern` was `nil` because object being processed do not implemement link references `call` method returned `nil` instead of returning document, even if document has been processed in for basic reference pattern.
2016-01-14Prevent circular reference error in BanzaiDouwe Maan
2016-01-05Merge branch 'master' into milestone-refDouwe Maan
2015-12-31Don't use delegate to delegate trivial methodsYorick Peterse
Around 300 ms (in total) would be spent in these delegated methods due to the extra stuff ActiveSupport adds to the compiled methods. Because these delegations are so simple we can just manually define the methods, saving around 275 milliseconds.
2015-12-24Escape all the things.Douwe Maan
2015-12-24More escaping!Douwe Maan
2015-12-24Render milestone links as referencesDouwe Maan
2015-12-24Escape reference link textDouwe Maan
2015-12-15Move Markdown/reference logic from Gitlab::Markdown to BanzaiDouwe Maan