summaryrefslogtreecommitdiff
path: root/lib/banzai
Commit message (Collapse)AuthorAgeFilesLines
* Enable more frozen string in lib/**/*.rbgfyoung2018-10-0650-0/+100
| | | | | | | | | | | | | Enables frozen for the following: * lib/*.rb * lib/banzai/**/*.rb * lib/bitbucket/**/*.rb * lib/constraints/**/*.rb * lib/container_registry/**/*.rb * lib/declarative_policy/**/*.rb Partially addresses #47424.
* Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqBob Van Landuyt2018-10-052-1/+8
|\
| * Merge branch 'security-fix-leaking-private-project-namespace' into 'master'Bob Van Landuyt2018-10-052-1/+8
| |\ | | | | | | | | | | | | | | | | | | [master] Fix leaking private project namespace Closes #2708 See merge request gitlab/gitlabhq!2529
| | * Filter system notes with public and private cross referencesBrett Walker2018-10-022-1/+8
| | |
* | | Merge branch 'load_project_features' into 'master'Sean McGivern2018-10-051-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Preload project features in reference parser Closes #43094 See merge request gitlab-org/gitlab-ce!22008
| * | Preload project features in reference parserJan Provaznik2018-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preloading of project_features mitigates N+1 queries when checking references in other projects. When loading projects for resources referenced in comments it makes sense to include also associated project_features because in the following step (`can_read_reference?(user, projects[node], node)`) project features is used for checking permissions for the given project.
* | | Merge branch 'mao/48221-issues_show_sql_count' into 'master'Sean McGivern2018-10-052-1/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Banzai label ref finder - minimize SQL calls by sharing context more aggresively Closes #48221 See merge request gitlab-org/gitlab-ce!22070
| * | | Banzai project ref- share context more aggresivelyMario de la Ossa2018-10-042-1/+2
| | |/ | |/| | | | | | | | | | | | | | | | Changes `Banzai::CrossProjectReference#parent_from_ref` to return the project in the context if the project's `full_path` matches the ref we're looking for, as it makes no sense to go to the database to find a Project we already have loaded.
* | | Support short reference to group entities from project entitiesce-7287-epic-referencesJarka Košanová2018-10-041-0/+6
|/ / | | | | | | | | | | - add a direct project parent (group) to Banzai context - if an epic is referenced from a direct descendant -> change epic to_reference to use short reference
* | Prevent Error 500s with invalid relative linksStan Hu2018-09-291-1/+5
|/ | | | https://gitlab.com/gitlab-org/gitlab-ce/issues/52009
* Use `Gitlab::SafeRequestStore` in more placesMichael Kozono2018-09-243-6/+6
| | | | | | Even if it doesn’t save lines of code, since people will tend to use code they’ve seen. And `SafeRequestStore` is safer since you don’t have to remember to check `RequestStore.active?`.
* Simplify by using Gitlab::SafeRequestStoreMichael Kozono2018-09-241-3/+1
| | | | These are clear wins.
* 'code_block' closer to original implementationBrett Walker2018-09-111-9/+5
| | | | | | - utilize the 'out' method to output the 'fence_info', which converts to utf8 - output 'sourcepos' again
* Resolve "Process urls with spaces in all markdown processing"Brett Walker2018-09-083-4/+5
|
* Resolve "Wiki page attachments not rendered properly"Brett Walker2018-09-072-15/+35
|
* Use ResourceLabelEvent for tracking label changesJan Provaznik2018-09-071-0/+14
|
* Uploads to wiki stored inside the wiki git repositoryFrancisco Javier López2018-09-042-8/+23
|
* Merge branch ↵Nick Thomas2018-08-231-2/+3
|\ | | | | | | | | | | | | | | | | '43096-controller-projects-issuescontroller-referenced_merge_requests-json-executes-more-than-100-sql-queries' into 'master' Resolve "Controller Projects::IssuesController#referenced_merge_requests.json executes more than 100 SQL queries" Closes #43096 See merge request gitlab-org/gitlab-ce!21237
| * Fix routes N+1 in Issues::ReferencedMergeRequestsService#executeSean McGivern2018-08-211-2/+3
| | | | | | | | | | Sorting here needs the project routes to be loaded, including the namespace routes.
* | Resolve "Wiki: links with spaces in the url render incorrectly with CommonMark"Brett Walker2018-08-212-0/+78
|/
* Add frozen_string_literal to recently-added files from the communitySean McGivern2018-08-102-0/+4
|
* Merge branch '28930-add-project-reference-filter' into 'master'Sean McGivern2018-08-103-0/+144
|\ | | | | | | | | | | | | Resolve "GFM : provide 'project' reference in comment" Closes #28930 See merge request gitlab-org/gitlab-ce!20285
| * Use a hash to memoize readable_project_ids with user objects as keysReuben Pereira2018-07-311-6/+5
| |
| * Remove nodes_visible_to_user from ProjectParser and memoize readable_project_idsReuben Pereira2018-07-151-17/+10
| |
| * Use map instead of collect in the ProjectParser#projects_readable_by_user ↵Reuben Pereira2018-07-051-1/+1
| | | | | | | | function
| * Add back the Project#to_reference_with_postfix function since it can be used ↵Reuben Pereira2018-07-051-1/+1
| | | | | | | | in the ProjectReferenceFilter#link_to_project function
| * Use a custom ProjectParser#nodes_visible_to_user function so that the user ↵Reuben Pereira2018-07-051-2/+21
| | | | | | | | permissions for all project references can be checked together
| * Correct the comment above the ProjectReferenceFilter.references_in method.Reuben Pereira2018-07-031-1/+1
| |
| * Eager load a project's route and its namespace with route in ↵Reuben Pereira2018-07-031-1/+1
| | | | | | | | project_reference_filter
| * Eager load the namespace and route of a project in project_reference_filter.rbReuben Pereira2018-07-031-1/+2
| |
| * Correct the comments above the ProjectReferenceFilter#project_link_filter ↵Reuben Pereira2018-07-031-2/+2
| | | | | | | | function to make it clear that the full project path is required in a reference.
| * Correct the misleading name of a variable in ↵Reuben Pereira2018-07-031-3/+3
| | | | | | | | ProjectReferenceFilter.project_link_filter
| * Correct the comment above the projects_hash function in the ↵Reuben Pereira2018-06-301-3/+3
| | | | | | | | project_reference_filter
| * A working implementation of a project reference filter which links project ↵Reuben Pereira2018-06-303-0/+132
| | | | | | | | references to project profile.
* | Allow users to set a statusBob Van Landuyt2018-07-301-0/+17
| | | | | | | | | | This can be done trough the API for the current user, or on the profile page.
* | Fix slow Markdown renderingStan Hu2018-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | The sanitize transformers were being duplicated each time the Markdown renderer was called, leading to expontential growth in rendering times. The problem was that although HTML::Pipeline::SanitizationFilter.WHITELIST is a frozen hash, the `:transformers` array can be modified. We need to do deep copy of this to avoid adding duplicates. Closes #49409
* | Merge branch 'sh-enable-frozen-literals-banzi-filters' into 'master'Rémy Coutable2018-07-233-3/+9
|\ \ | | | | | | | | | | | | Enable frozen strings in remaining lib/banzai/filter/*.rb files See merge request gitlab-org/gitlab-ce!20777
| * | Enable frozen strings in remaining lib/banzai/filter/*.rb filessh-enable-frozen-literals-banzi-filtersStan Hu2018-07-233-3/+9
| | | | | | | | | | | | | | | | | | | | | This also fixes a bug with the ImageLazyLoadFilter not doing the right thing when an existing class attribute is present. Part of #47424
* | | Enable frozen strings in lib/banzai/filter/*.rbsh-freeze-banzai-filter-stringsStan Hu2018-07-2338-0/+76
|/ / | | | | | | | | | | | | | | | | | | Excludes a few filters that require more work: * lib/banzai/filter/image_lazy_load_filter_spec.rb * lib/banzai/filter/syntax_highlight_filter_spec.rb * lib/banzai/filter/table_of_contents_filter_spec.rb Part of #47424
* | Merge branch 'extract-ee-specific-banzai-filters' into 'master'Robert Speicher2018-07-173-10/+28
|\ \ | | | | | | | | | | | | Extract EE-specific lines from Banzai pipelines See merge request gitlab-org/gitlab-ce!20636
| * | Extract EE-specific lines from Banzai pipelinesextract-ee-specific-banzai-filtersSean McGivern2018-07-133-10/+28
| | |
* | | Merge branch 'satishperala/gitlab-ce-20720_webhooks_full_image_url' into ↵Douwe Maan2018-07-171-21/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | 'master' Include full image URL in webhooks for uploaded images Closes #20720 See merge request gitlab-org/gitlab-ce!18109
| * | Merge branch 'master' into satishperala/gitlab-ce-20720_webhooks_full_image_urlSean McGivern2018-07-067-28/+23
| |\ \
| * | | Add documentation and specs for webhook URL rewritingSean McGivern2018-07-061-21/+1
| | | |
* | | | Updates from `rubocop -a`Lin Jen-Shin2018-07-091-1/+1
| | | |
* | | | Improve render performance of large wiki pagesPeter Leitzen2018-07-071-3/+8
| |/ / |/| | | | | | | | | | | | | | Compile often used regexps only once outside of the loop. This commit improves the performance of large wiki pages with many, many references.
* | | Merge branch 'pravi/gitlab-ce-update-html-pipeline' into 'master'Douwe Maan2018-07-041-12/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | update html-pipeline 2.7.1 -> 2.8 Closes #48571 See merge request gitlab-org/gitlab-ce!20348
| * | | Use strong_memoize to customize the SanitizationFilter whitelistRobert Speicher2018-07-031-12/+5
| | | | | | | | | | | | | | | | I never liked the hacky `customized?` method anyway, so this is cleaner.
| * | | dup whitelist before modificationPirate Praveen2018-06-301-1/+1
| | |/ | |/| | | | | | | Fixes ActionView::Template::Error (can't modify frozen Hash) #48415
* | | Merge branch '44994-osw-use-monospaced-font-on-diffs-commit-ref' into 'master'Robert Speicher2018-07-032-3/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Render SHA in merge request commit reference with mono spaced font" Closes #44994 See merge request gitlab-org/gitlab-ce!20228