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
2020-11-30Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-06-22Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-06-04Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-05-26Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-03-04Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-02-06Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-01-29Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-01-23Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-01-16Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-01-15Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-01-14Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-11-02Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-10-23Pass all wiki markup formats through pipelinesLuke Duncalfe
Previously, when the wiki page format was anything other than `markdown` or `asciidoc` the formatted content would be returned though a Gitaly call. Gitaly in turn would delegate formatting to the gitlab-gollum-lib gem, which in turn would delegate that to various gems (like RDoc for `rdoc`) and then apply some very liberal sanitization. It was too liberal! This change brings our wiki content formatting in line with how we format other markdown at GitLab, so we have a SSOT for sanitization. https://gitlab.com/gitlab-org/gitlab/issues/30540
2019-07-07Extract plain file rendering into a separate methodVasiliy Yakliushin
2019-07-07Fix undefined method `simple_format for MarkupHelper:ModuleVasiliy Yakliushin
`simple_format` is not defined in ActionView::Helpers::TagHelper, but it is actually located in ActionView::Helpers::TextHelper. The solution is to include the correct helper. I've also added tests for `#markup_unsafe` because they were missing.
2019-06-20Render GFM html in GraphQLBob Van Landuyt
This adds a `markdown_field` to our types. Using this helper will render a model's markdown field using the existing `MarkupHelper` with the context of the GraphQL query available to the helper. Having the context available to the helper is needed for redacting links to resources that the current user is not allowed to see. Because rendering the HTML can cause queries, the complexity of a these fields is raised by 5 above the default. The markdown field helper can be used as follows: ``` markdown_field :note_html, null: false ``` This would generate a field that will render the markdown field `note` of the model. This could be overridden by adding the `method:` argument. Passing a symbol for the method name: ``` markdown_field :body_html, null: false, method: :note ``` It will have this description by default: > The GitLab Flavored Markdown rendering of `note` This could be overridden by passing a `description:` argument. The type of a `markdown_field` is always `GraphQL::STRING_TYPE`.
2019-06-14Add basic support for AsciiDoc include directiveGuillaume Grossetie
See http://asciidoctor.org/docs/user-manual/#include-directive
2019-04-29Fix slow performance with compiling HAML templatesStan Hu
In Rails 5, including `ActionView::Context` can have a significant and hidden performance penalty because this module also includes `ActionView::CompiledTemplates`. This means that any module that includes ActionView::Context becomes a descendant of `CompiledTemplates`. When a partial is rendered for the first time, it runs `ActionView::CompiledTemplates#module_eval`, which will evaluate a string that defines a new method for that partial. For example, the source of partial might be this string: ``` def _app_views_project_show_html_haml___12345(local_assigns, output) "hello world" end ``` When this string is evaluated, the Ruby interpreter will define the method and clear the global method cache for all descendants of `ActionView::CompiledTemplates`. Previous to this change, we inadvertently made a number of modules fall into this category: * GroupChildEntity * NoteUserEntity * Notify * MergeRequestUserEntity * AnalyticsCommitEntity * CommitEntity * UserEntity * Kaminari::Helpers::Paginator * CurrentUserEntity * ActionView::Base * ActionDispatch::DebugExceptions::DebugView * MarkupHelper * MergeRequestPresenter After this change: * Kaminari::Helpers::Paginator * ActionView::Base * ActionDispatch::DebugExceptions::DebugView Each time a partial is rendered for the first time, all methods for those modules will have to be redefined. This can exact a significant performance penalty. How bad is this penalty? Using the following benchmark script, we can use DTrace to sample the Ruby interpreter: ``` Benchmark.bm do |x| x.report do 1000.times do ActionView::CompiledTemplates.module_eval("def testme\nend") end end end ``` This revealed a 11x jump in the time spent in `core#define_method` alone. Rails 6 fixes this behavior by moving the `include CompiledTemplates` into ActionView::Base so that including `ActionView::Context` doesn't quietly affect other modules in this way. Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/11198
2019-04-24Resolve "Merge Request Popover is not working on the To Do page"Sam Bigelow
2019-04-12Remove rails-deprecated_sanitizer dependencyDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-03-06Adds the Rubocop ReturnNil copAndrew Newdigate
This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points
2019-02-04Remove Redcarpet markdown engineJan Provaznik
This engine was replaced with CommonMarker in 11.4, it was deprecated since then.
2018-09-13Remove images in 'first_line_in_markdown'Brett Walker
By default, we now strip images in the 'first_line_in_markdown' method. This keeps images from being displayed in the one-liner of both todo and project activity panels. Although not currently used, we allow images to be preserved with the allow_images: true options.
2018-09-07Enable frozen string for app/helpers/**/*.rbgfyoung
Partially addresses #47424.
2018-09-05added feature flag 'commonmark_for_repositories'Brett Walker
2018-09-05move logic into legacy_render_context helper methodBrett Walker
2018-09-05render using RedCarpet if legacy_render parameter is setBrett Walker
2018-09-05Enable CommonMark for files and wikisBrett Walker
2018-07-06Use proper markdown rendering for previewsBrett Walker
2018-04-11Support Markdown rendering using multiple projectsYorick Peterse
This refactors the Markdown pipeline so it supports the rendering of multiple documents that may belong to different projects. An example of where this happens is when displaying the event feed of a group. In this case we retrieve events for all projects in the group. Previously we would group events per project and render these chunks separately, but this would result in many SQL queries being executed. By extending the Markdown pipeline to support this out of the box we can drastically reduce the number of SQL queries. To achieve this we introduce a new object to the pipeline: Banzai::RenderContext. This object simply wraps two other objects: an optional Project instance, and an optional User instance. On its own this wouldn't be very helpful, but a RenderContext can also be used to associate HTML documents with specific Project instances. This work is done in Banzai::ObjectRenderer and allows us to reuse as many queries (and results) as possible.
2018-01-11Adds Rubocop rule for line break around conditionals🙈 jacopo beschi 🙉
2017-12-07Merge branch 'ce-backport-3615' into 'master'Sean McGivern
Refactor banzai to support referencing from group context See merge request gitlab-org/gitlab-ce!15766
2017-12-06Refactor banzai to support referencing from group contextJarka Kadlecova
2017-12-04show status of issue links in wiki pagehaseeb
2017-11-20Merge branch '39497-inline-edit-issue-on-mobile' into 'master'Annabel Dunstone Gray
Add inline editing to issues on mobile Closes #39497 See merge request gitlab-org/gitlab-ce!15438
2017-11-19Add inline editing to issues on mobileEric Eastwood
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/39497
2017-11-16Adds Rubocop rule for line break after guard clauseJacopo
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-06Resolve "DashboardController#activity.json is slow due to SQL"Francisco Javier López
2017-11-06Resolve "Editor icons"Tim Zallmann
2017-09-06Adds cacheless render to Banzai object renderTiago Botelho
2017-05-18Fix ProjectCacheWorker for plain READMEsToon Claes
The ProjectCacheWorker refreshes cache periodically, but it runs outside Rails context. So include the ActionView helpers so the `content_tag` method is available.
2017-05-11Merge branch '27144-enforce-rubocop-trailing_commas-no_comma-style' into ↵Robert Speicher
'master' Resolve "Use consistent style for trailing commas" Closes #27144 See merge request !11063
2017-05-10Enable the Style/TrailingCommaInLiteral copRémy Coutable
Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10Merge branch 'bvl-security-9-1-markup-pipeline'Robert Speicher
(security-9-1) Render asciidoc & other markup using banzai in a pipeline See merge request !2098
2017-04-28Pull preserve into render helpersDouwe Maan
2017-04-27Avoid including the MarkupHelperToon Claes
2017-04-27Add commit to the Banzai::post_process contextToon Claes
2017-04-27`markdown` helper is not used with pre-rendered contentToon Claes
2017-04-27Make the `_unsafe` methods privateToon Claes
2017-04-27Single quotes in MarkupHelper where possibleToon Claes