summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/reference_extractor_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Change all `:empty_project` to `:project`rs-empty_project-defaultRobert Speicher2017-08-021-2/+2
|
* Use described_class when possibleRémy Coutable2017-07-271-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable2017-07-271-1/+1
| | | | | | services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
* Support both internal and external issue trackersJarka Kadlecova2017-07-241-4/+27
|
* Create directly_addressed Todos when mentioned in beginning of a lineErshad Kunnakkadan2017-02-081-0/+75
|
* Use `:empty_project` where possible throughout spec/librs-empty_project-libRobert Speicher2017-01-251-8/+14
|
* Merge branch 'issue_23548_dev' into 'master'Douwe Maan2016-11-091-1/+2
| | | | | | | | | | | | | | | | | | | | | disable markdown in comments when referencing disabled features fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23548 This MR prevents the following references when tool is disabled: - issues - snippets - commits - when repo is disabled - commit range - when repo is disabled - milestones This MR does not prevent references to repository files, since they are just markdown links and don't leak information. See merge request !2011 Signed-off-by: Rémy Coutable <remy@rymai.me>
* Remove JiraIssue model and replace references with ExternalIssueIlan Shamir2016-06-161-1/+2
|
* Update reference unfolder according to recent ability changesGrzegorz Bizon2016-03-191-1/+4
| | | | | Commit 43d8bdb4f048cbeb5675ed9120cb1aeb415b9586 introduced additional checks for permissions to read issue in references extractor.
* Merge branch 'master' into feature/issue-moveGrzegorz Bizon2016-03-191-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (121 commits) Dedupe labels in labels selector in Dashboard pages Refactor colors and lists Add a safeguard in MergeRequest#compute_diverged_commits_count Fix an issue when the target branch of a MR had been deleted Add avatar to issue and MR pages header Cleanup somce css colors Re-group scss variables Refactor `Todo#target` Fixes issue with filter label missing on labels & milestones Rename `Todo#to_reference` to `Todo#target_reference` Fixed failing tests Updated controller with before_action Fixed other issues based on feedback Fixes issue on dashboard issues Full labels data in JSON Fixed issue with labels dropdown getting wrong labels Update CHANGELOG Use `Note#for_project_snippet?` to skip notes on project snippet Use `Commit#short_id` instead of `Commit.truncate_sha` Reuse `for_commit?` on conditional validations Update schema info comment on todo related files ... Conflicts: app/models/issue.rb db/schema.rb spec/models/issue_spec.rb
| * Restrict access to references for confidential issuesDouglas Barbosa Alexandre2016-03-171-0/+2
| |
* | Improvements in issue move feaure (refactoring)Grzegorz Bizon2016-03-191-0/+5
| | | | | | | | According to endbosses' suggestions.
* | Move reference unfolder for GFM to separate classGrzegorz Bizon2016-03-171-0/+12
|/
* Backport JIRA serviceDrew Blessing2015-12-181-0/+10
|
* Tag lib specsDouwe Maan2015-12-091-1/+1
|
* Allow ReferenceExtractor to efficiently load references from multiple texts ↵Douwe Maan2015-10-131-7/+7
| | | | at once
* Always allow references to the current projectDouwe Maan2015-10-071-2/+2
|
* Refactor reference gathering to use a dedicated filterDouwe Maan2015-10-071-2/+2
|
* Revert "Merge branch 'revert-satellites' into 'master' "Dmitriy Zaporozhets2015-08-111-4/+4
| | | | | This reverts commit 5daf44b7c86e0e2641a902b1da8b01d91fa3dbfa, reversing changes made to 2f706fbd231cabe7a76a5d17ac44285aaaf8592c.
* Revert "Merge branch 'drop-satellites'"Dmitriy Zaporozhets2015-08-111-4/+4
| | | | | | | This reverts commit 957e849f41d96fa9778fcdd06792d2f0274b29ab, reversing changes made to 6b9dbe9f5a175a8162abf296367f561bab3eea1a. Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Improve tests to use real branches in merge requestsDmitriy Zaporozhets2015-08-041-4/+4
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Ignore references in blockquotes.Douwe Maan2015-06-021-0/+4
|
* Actually ignore references in code blocks etc.Douwe Maan2015-06-021-0/+20
|
* Make use of to_reference in more specsRobert Speicher2015-05-261-2/+2
|
* Add CommitRange directly to results HashRobert Speicher2015-04-251-4/+4
|
* Refactor ReferenceExtractor to use pipeline filtersRobert Speicher2015-04-251-74/+0
|
* Use project.commit convenience method.Douwe Maan2015-04-241-3/+3
|
* Add spec for ReferenceExtractor#labelsRobert Speicher2015-04-201-0/+9
|
* Fix ReferenceExtractor specRobert Speicher2015-04-201-1/+1
|
* Update tests.Douwe Maan2015-04-031-18/+22
|
* Fix errors.Douwe Maan2015-04-021-79/+74
|
* Merge branch 'disable-ref-generation-in-code-blocks' into 'master'Dmitriy Zaporozhets2015-03-221-0/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable reference generation in preformatted/code blocks ### Summary If a user adds text in code or preformatted text via Markdown or HTML that contains `#XXX`, the system adds a note that issue `XXX` was mentioned. This is particularly annoying because we often list gdb backtrace dumps into our issues, and many issues get mentioned as a result. For example: ``` (gdb) bt #0 0x00000000004004c4 in second () at main.cc:6 #1 0x00000000004004d2 in first () at main.cc:11 #2 0x00000000004004dd in main () at main.cc:17 (gdb) ``` ### Steps to reproduce 1. In an issue, write the above text using Markdown or HTML tags (e.g. `<code>`, `<pre>`). 2. Observe that [issue 1](https://gitlab.com/gitlab-org/gitlab-ce/issues/1) and [issue 2](https://gitlab.com/gitlab-org/gitlab-ce/issues/2) have a note that says they were mentioned. ### Expected behavior Everything enclosed in the code blocks should be ignored as references. ### Observed behavior Issues get referenced unnecessarily. ### Fix I've made `reference_extractor.rb` strip out HTML and Markdown blocks before processing. I considered running the raw text through the entire Markdown processor, but this seems overkill and perhaps could lead to some unintended side effects. See merge request !365
| * Disable reference creation for comments surrounded by code/preformatted blocksStan Hu2015-03-191-0/+20
| |
* | Fix cross references when usernames, milestones, or project names contain ↵Stan Hu2015-03-191-0/+14
|/ | | | | | underscores. Remove emphasis from system notes to avoid Markdown conflicts in names.
* Automatically link commit ranges to compare page.Douwe Maan2015-03-071-0/+19
|
* Updated rspec to rspec 3.x syntaxJeroen van Baarsen2015-02-121-17/+17
| | | | Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Remove unused feature steps.Marin Jankovski2015-01-261-1/+0
|
* Track projects in ReferenceExtractorVinnie Okada2014-10-031-24/+28
| | | | | | Store both the project and identifier of extracted references. This prevents `ReferenceExtractor` from returning objects in the wrong project for cross-project references.
* Add support for Jira ticket mentions in format JIRA-123.Marin Jankovski2014-05-131-0/+6
| | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: CHANGELOG-EE
* Make changes to testsDmitriy Zaporozhets2014-01-221-1/+1
| | | | | | | * project_with_code -> project * project -> ermpty_project Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Link issues from comments and automatically close themash wilson2013-08-251-0/+95
Any mention of Issues, MergeRequests, or Commits via GitLab-flavored markdown references in descriptions, titles, or attached Notes creates a back-reference Note that links to the original referencer. Furthermore, pushing commits with commit messages that match a (configurable) regexp to a project's default branch will close any issues mentioned by GFM in the matched closing phrase. If accepting a merge request would close any Issues in this way, a banner is appended to the merge request's main panel to indicate this.