Robert Speicher
95ca6584d8
Add CommitRange directly to results Hash
2015-04-25 14:46:06 -04:00
Robert Speicher
2207e5a6c9
DRY up ReferenceExtractor
2015-04-25 14:41:07 -04:00
Robert Speicher
c0a97d70ef
Don't allow nil references to get added to results
2015-04-25 14:41:06 -04:00
Robert Speicher
6bac823ad4
Update CommitRangeReferenceFilter to use CommitRange class
...
Also matches CommitReferenceFilter's new behavior of always using short
SHAs in the link text.
2015-04-25 14:41:06 -04:00
Robert Speicher
2c8bfedb20
Always use short SHAs as commit reference link text
...
Now when a user pastes a full SHA like
`d7f61affaf845f44b4cc995e34eb1606c47c8eff`, its link text will only show
`d7f61aff` for brevity.
2015-04-25 14:40:40 -04:00
Robert Speicher
8f8a8ab32b
Refactor ReferenceExtractor to use pipeline filters
2015-04-25 14:40:12 -04:00
Robert Speicher
a6defd1576
Add results to reference filters
2015-04-25 14:39:45 -04:00
Robert Speicher
879be42862
Initialize the references result Hash in ReferenceFilter
2015-04-25 14:39:44 -04:00
Robert Speicher
c597b5d09d
Fix Profile > Design live-updating
...
`ui_blue` wasn't added to the list of classes to remove, so if a user
changed to that theme, any subsequent changes wouldn't be live-updated.
This change refactors Gitlab::Theme a bit to make it harder for this to
happen in the future with new themes.
2015-04-25 14:03:40 -04:00
Zhang Sen
0cbafa4d65
Fix contributions calendar empty problem under mysql
...
When using MySQL as database backend in GitLab, ``date`` in ``date(created_at), count(id) as total_amount``
won't return the ``date`` column (should be ``date(created_at)``), as a result, there's no contribution in the user
profile page.
Adding an ``as date`` can solve this problem.
2015-04-25 20:13:52 +08:00
Douwe Maan
c2f11f3209
Get Gitorious importer to work again.
2015-04-24 23:30:12 +02:00
Douwe Maan
5f839770e7
Revert "Rename namespace_regex to namespace_path_regex."
...
This reverts commit c0116926c7 .
2015-04-24 15:16:38 +02:00
Douwe Maan
c0116926c7
Rename namespace_regex to namespace_path_regex.
2015-04-24 14:49:22 +02:00
Douwe Maan
1d2a5ee188
Revert "Revert disallowing usernames to end in period."
...
This reverts commit c75c6b840b .
2015-04-24 14:47:49 +02:00
Douwe Maan
2456695422
Fix errors.
2015-04-24 12:30:37 +02:00
Douwe Maan
27af24c1c9
No longer needed to pass project argument to commit methods.
2015-04-24 12:29:36 +02:00
Douwe Maan
8ed7ac9d44
Use project.commit convenience method.
2015-04-24 12:29:36 +02:00
Robert Speicher
a14d109b9b
Provide autoload paths for filters to prevent circular dependency
2015-04-23 12:58:55 -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
Robert Speicher
fb5116caa2
Use search_text_nodes helper in our custom filters
...
Closes #1477
2015-04-22 13:18:15 -04:00
Robert Speicher
fca624670a
Update Gitlab::Markdown to use the 🆕 EmojiFilter ✨
...
Removes emoji-centric tests from GFM specs 💥
2015-04-21 12:53:42 -04:00
Robert Speicher
4ced630fed
Add Gitlab::Markdown::EmojiFilter
2015-04-21 12:53:42 -04:00
Dmitriy Zaporozhets
2cd501f7e4
Merge branch 'rs-reference-filters' into 'master'
...
Convert GFM reference handling to html-pipeline filters
- `Gitlab::Markdown` is now much cleaner
- Better separation of concerns
- Cleaner, less brittle, more maintainable specs for each reference type.
- Label references actually work!
See merge request !1753
2015-04-21 16:43:54 +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
Douwe Maan
1c30f77599
Don't autolink masked imported email addresses.
2015-04-21 10:32:48 +02:00
Douwe Maan
18f80c5560
Fix rendering of deleted blocking/blocked-on statuses.
2015-04-21 10:32:29 +02:00
Douwe Maan
bc2dd5e772
Import "Comment #10 " as "Comment 10" to not incorrectly reference issue.
2015-04-21 10:31:50 +02:00
Douwe Maan
c242ca9a17
Get imported links to render correctly by not escaping all special chars.
2015-04-21 10:31:15 +02:00
Douwe Maan
96c03199dd
Add "imported from Google Code" to imported issues.
2015-04-21 10:30:23 +02:00
Douwe Maan and Robert Speicher
c52bf4ad3c
Tweak single-word label regex to fix pending spec.
2015-04-20 13:01:47 -04:00
Douwe Maan and Robert Speicher
b5802d144b
project_from_ref returns nil when reference doesn't exist.
2015-04-20 13:01:47 -04:00
Robert Speicher
2823c058d8
project_from_ref returns nil when reference can't be accessed
...
Prior it would return the project from the current context, which wasn't
the intended behavior.
2015-04-20 13:01:47 -04:00
Robert Speicher
34f1dbb143
Better commit lookup for CommitRangeReferenceFilter
2015-04-20 13:01:46 -04:00
Robert Speicher
6853465acf
Remove extraneous IGNORE_PARENTS from filter
2015-04-20 13:01:46 -04:00
Robert Speicher
621687bfdf
Fix user_can_reference_project? check
2015-04-20 13:01:46 -04:00
Robert Speicher
b905702d4f
Escape title attributes in references
2015-04-20 13:01:46 -04:00
Robert Speicher
31172475d2
Better guard against nil projects in ReferenceFilter
2015-04-20 13:01:46 -04:00
Robert Speicher
9eaaa7cdef
Minor doc fix
...
[ci skip]
2015-04-20 13:01:45 -04:00
Robert Speicher
5b6c1a2182
Fix Issue and ExternalIssue reference specs
2015-04-20 13:01:45 -04:00
Robert Speicher
b3b8fc6c8a
DRY up reference filters using ReferenceFilter base class
2015-04-20 13:01:45 -04:00
Robert Speicher
6189b24fdd
Add a ReferenceFilter base class
...
This will allow for the removal of a lot of duplication from the
reference filters.
2015-04-20 13:01:45 -04:00
Robert Speicher
c4eb6a55f1
Fix user_can_reference_group? check
2015-04-20 13:01:45 -04:00
Robert Speicher
52909f8bdb
Add permission check to ReferenceExtractor's user mentions
2015-04-20 13:01:45 -04:00
Robert Speicher
62282971e0
Rename user_can_read_group? to user_can_reference_group?
2015-04-20 13:01:44 -04:00
Robert Speicher
a803cd51eb
Check for project read permissions in cross-references
2015-04-20 13:01:44 -04:00
Robert Speicher
34a23bda60
Add current_user to filter context
2015-04-20 13:01:43 -04:00
Robert Speicher
43c62ca3f2
Remove Gitlab::Markdown from Gitlab::ReferenceExtractor
2015-04-20 13:01:43 -04:00
Robert Speicher
29604ff2c3
Add permission checking to UserReferenceFilter
2015-04-20 13:01:43 -04:00
Robert Speicher
189c5347be
Add name-based referencing to LabelReferenceFilter
2015-04-20 13:01:43 -04:00
Robert Speicher
77a6746a75
Run SanitizationFilter before our reference filters
2015-04-20 13:01:42 -04:00