Commit Graph

52 Commits

Author SHA1 Message Date
Ershad Kunnakkadan 3a23639bc0
Create directly_addressed Todos when mentioned in beginning of a line 2017-02-08 21:53:34 +05:30
Yorick Peterse 86166d2802
Split Markdown rendering & reference gathering
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-05-26 17:14:00 +02:00
Grzegorz Bizon 9b13ce0b7a Improvements in issue move feaure (refactoring)
According to endbosses' suggestions.
2016-03-19 18:46:01 +01:00
Grzegorz Bizon fd8394faae Move reference unfolder for GFM to separate class 2016-03-17 07:39:15 +01:00
Douwe Maan 2a20c0e590 Prevent circular reference error in Banzai 2016-01-14 11:30:28 +01:00
Douwe Maan fd91b48f24 Merge branch 'master' into milestone-ref 2016-01-05 16:40:23 +01:00
Douwe Maan 672cbbff95 Only allow group/project members to mention `@all` 2015-12-24 15:33:51 +01:00
Douwe Maan 989131c530 Render milestone links as references 2015-12-24 14:43:07 +01:00
Drew Blessing f177aaa5fa Backport JIRA service 2015-12-18 14:19:48 -06:00
Douwe Maan 7781bda9bd Move Markdown/reference logic from Gitlab::Markdown to Banzai 2015-12-15 15:51:16 +01:00
Douwe Maan e1e67d383e Move Markdown filters and pipelines into folders. 2015-11-19 16:18:13 +01:00
Douwe Maan aa4007a597 Slight refactoring 2015-10-22 15:40:36 +02:00
Douwe Maan de0acf3cf7 Merge branch 'master' into reference-pipeline-and-caching 2015-10-21 11:36:41 +02:00
Douwe Maan cc2b05adf8 Fix bug where a push would only create cross references from the first commit. 2015-10-18 14:05:27 +02:00
Douwe Maan 95f0440a78 Merge branch 'master' into rs-redactor-filter 2015-10-15 11:26:58 +02:00
Douwe Maan 925dc5925b Cache rendered contents of issues, MRs and notes 2015-10-14 21:29:35 +02:00
Douwe Maan b093cb35d1 Use Gitlab::Markdown for Asciidoc and ReferenceExtractor pipelines 2015-10-14 20:18:49 +02:00
Douwe Maan da9746e59a Enable caching of Gitlab::Markdown rendered result 2015-10-14 19:28:46 +02:00
Douwe Maan ed41333a6e Use Gitlab::Markdown.render with :pipeline option rather than different methods 2015-10-14 19:28:09 +02:00
Douwe Maan d313a7681b Explicitly only parse references by specified filter 2015-10-14 09:46:06 +02:00
Douwe Maan d6fb96b927 Have Issue#participants load all users mentioned in notes using a single query 2015-10-14 09:17:05 +02:00
Douwe Maan cd2583a3be Code cleanup 2015-10-13 23:03:53 +02:00
Douwe Maan 93fcddd7a7 Allow ReferenceExtractor to efficiently load references from multiple texts at once 2015-10-13 22:53:05 +02:00
Douwe Maan b0164771ec Simplify code around (cross)-references 2015-10-12 11:54:46 +02:00
Douwe Maan f42cfa9e87 Refactor reference gathering to use a dedicated filter 2015-10-07 17:00:48 +02:00
Robert Speicher f43e48a1ce Require gitlab/markdown in ReferenceExtractor 2015-09-01 13:28:19 -04:00
Robert Speicher 4340dd3eeb Decouple Gitlab::Markdown from the GitlabMarkdownHelper
This module is now the sole source of knowledge for *how* we render
Markdown (and GFM).
2015-08-27 14:17:26 -07:00
Douwe Maan 94919c7ef6 Ignore references in blockquotes. 2015-06-02 13:17:21 +02:00
Douwe Maan fe78984f20 Actually ignore references in code blocks etc. 2015-06-02 13:17:11 +02:00
Robert Speicher 2207e5a6c9 DRY up ReferenceExtractor 2015-04-25 14:41:07 -04:00
Robert Speicher 8f8a8ab32b Refactor ReferenceExtractor to use pipeline filters 2015-04-25 14:40:12 -04:00
Dmitriy Zaporozhets 285ae60c15 Merge branch 'issue-body-code-mentions' into 'master'
Fix bug causing at-username inside code blocks to sometimes be picked up as a user mention.

Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2254.

See merge request !553
2015-04-23 12:33:01 +00:00
Douwe Maan 51ad59e0d8 Fix bug causing `@whatever` inside code blocks to sometimes be picked up as a user mention. 2015-04-21 14:58:18 +02:00
Robert Speicher 52909f8bdb Add permission check to ReferenceExtractor's user mentions 2015-04-20 13:01:45 -04:00
Robert Speicher 43c62ca3f2 Remove Gitlab::Markdown from Gitlab::ReferenceExtractor 2015-04-20 13:01:43 -04:00
Dmitriy Zaporozhets ecb58dacd6 Merge branch 'reference-access-control' into 'master'
Only allow users to reference groups, projects, issues, MRs, commits they have access to.

Addresses https://dev.gitlab.org/gitlab/gitlabhq/issues/2183.

See merge request !1742
2015-04-13 14:10:25 +00:00
Robert Speicher 5a0ff2f52f Be more explicit about which "Markdown" ReferenceExtractor includes 2015-04-09 17:28:46 -04:00
Douwe Maan b492f0f86e Refactor ReferenceExtractor. 2015-04-03 18:03:15 +02:00
Douwe Maan c5d7660000 Fix errors. 2015-04-02 22:36:54 +02:00
Douwe Maan 756e7aa8c3 Don't allow full access to guests in ReferenceExtractor 2015-04-02 10:57:01 +02:00
Douwe Maan d2bd606759 Refactor Mentionable mentioned users to use ReferenceExtractor. 2015-04-02 10:57:01 +02:00
Douwe Maan ca58e369c9 Only allow user to reference objects they have access to. 2015-04-02 10:56:04 +02:00
Douwe Maan b1ef1aa59f Slightly refactor ReferenceExtractor. 2015-04-02 10:53:38 +02:00
Stan Hu 83d552d50d Disable reference creation for comments surrounded by code/preformatted blocks 2015-03-19 14:37:35 -07:00
Douwe Maan 4dddaef866 Automatically link commit ranges to compare page. 2015-03-07 00:46:13 +01:00
Marin Jankovski 29e606deec Add ExternalIssue base model to make issue referencing more robust for external issue trackers. 2015-02-11 09:21:57 -08:00
Nikita Verkhovin 8681cb3137 Add labels notes 2015-02-08 22:35:41 +06:00
Vinnie Okada 2c46c4523f Track projects in ReferenceExtractor
Store both the project and identifier of extracted references.  This
prevents `ReferenceExtractor` from returning objects in the wrong
project for cross-project references.
2014-10-03 12:30:20 -05:00
Vinnie Okada 7edc1439fe Fix ReferenceExtractor
The cross-project reference feature broke the ReferenceExtractor class;
this fixes it.
2014-10-03 12:30:20 -05:00
Ciro Santilli 2e9f5de868 Add parenthesis to function def with arguments. 2014-10-03 09:18:46 +02:00