BigW Consortium Gitlab

  1. 14 Apr, 2015 3 commits
  2. 24 Mar, 2015 1 commit
  3. 23 Mar, 2015 28 commits
  4. 22 Mar, 2015 8 commits
    • Merge branch 'disable-ref-generation-in-code-blocks' into 'master' · fb300396
      Dmitriy Zaporozhets authored
      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
    • Merge branch 'fix-dots-in-wiki-title' into 'master' · 1d85e5ff
      Dmitriy Zaporozhets authored
      Fix dots in Wiki slug causing errors
      
      ### What does this MR do?
      
      When a user enters in dots into the Wiki slug, an error occurs:
      
      ```
      NoMethodError (undefined method `escaped_url_path' for nil:NilClass):
        app/models/wiki_page.rb:172:in `set_attributes'
        app/models/wiki_page.rb:191:in `save'
        app/models/wiki_page.rb:155:in `update'
        app/controllers/projects/wikis_controller.rb:49:in `update'
      ```
      
      This MR fixes this problem.
      
      ### Are there points in the code the reviewer needs to double check?
      
      See the problem below.
      
      ### Why was this MR needed?
      
      The issue is that the `save` method gets called differently:
      
      ```ruby
      def create(attr = {})
      ....
          save :create_page, title, content, format, message
      ```
      
      or
      
      ```ruby
      def update(new_content = "", format = :markdown, message = nil)
      ...
          save :update_page, @page, content, format, message
      ```
      
      In the create case, title is the slug entered in by the user (e.g. `path/how-to-write-wiki-pages`).
      
      In the update case, originally `@page.page` included the format extension (e.g.`path/how-to-write-wiki-pages.Markdown`). The method `page_title_and_dir` was trying to handle both cases and not doing the right thing. For example, calling `page_title_and_dir('test-1.2.3')` would result in:
      
      ```
      path_title = test-1.2
      path_dir = 3
      ```
      
      ### What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)?
      
      Issues #1263, #431
      
      This replaces !156
      
      See merge request !419
    • Merge branch 'master' into 'master' · 75105366
      Dmitriy Zaporozhets authored
      Updated upgrader.md to highlight nodejs as required package [ci skip]
      
      Updated upgrader.md to highlight nodejs pacakage so this is kept consistent with the other packages listed as required/changed.
      
      This is purely a documentation change.
      
      See merge request !424
    • Merge branch 'fix-import-from-modal' into 'master' · 37432147
      Dmitriy Zaporozhets authored
      Fix "Import projects from" button to show the correct instructions
      
      Closes #1267
      
      See merge request !422