An error occurred fetching the project authors.
  1. 30 May, 2017 1 commit
    • Sean McGivern's avatar
      Fix /unsubscribe slash command creating extra todos · 172932ee
      Sean McGivern authored
      The /unsubscribe slash command means that we check if the current user is
      subscribed to the issuable without having an explicit subscription. That means
      that we use the UserParser to find references to them in the notes.
      
      The UserParser (and all parsers inheriting from BaseParser) use RequestStore to
      cache ActiveRecord objects, so that we don't need to load the User object each
      time, if we're parsing references a bunch of times in the same request.
      
      However, it was always returning _all_ of the previously cached items, not just
      the ones matching the IDs passed. This would mean that we did two runs through
      with UserParser if you were mentioned in a comment, and then mentioned someone
      else in your comment while using /unsubscribe:
      
      1. Because /unsubscribe was used, we see if you were mentioned in any comments.
      2. Because you mentioned someone, we find them - but we would also get back your
         user, even if you didn't mention yourself. This would have the effect of
         creating a mention or directly addressed todo for yourself incorrectly.
      
      The fix is simple: only return values from the cache matching the IDs passed.
      172932ee
  2. 07 Apr, 2017 1 commit
    • Adam Buckland's avatar
      Add indication for closed or merged issuables in GFM · ace833b3
      Adam Buckland authored
      Example: for issues that are closed, the links will now show '[closed]'
      following the issue number. This is done as post-process after the markdown has
      been loaded from the cache as the status of the issue may change between
      the cache being populated and the content being displayed.
      
      In order to avoid N+1 queries problem when rendering notes ObjectRenderer
      populates the cache of referenced issuables for all notes at once,
      before the post processing phase.
      
      As a part of this change, the Banzai BaseParser#grouped_objects_for_nodes
      method has been refactored to return a Hash utilising the node itself as the
      key, since this was a common pattern of usage for this method.
      ace833b3
  3. 23 Feb, 2017 2 commits
  4. 25 Jan, 2017 1 commit
  5. 09 Nov, 2016 1 commit
  6. 30 Aug, 2016 1 commit
  7. 03 Jun, 2016 2 commits
  8. 26 May, 2016 1 commit
    • Yorick Peterse's avatar
      Split Markdown rendering & reference gathering · 86166d28
      Yorick Peterse authored
      This splits the Markdown rendering and reference extraction phases into
      two distinct code bases. The reference extraction phase no longer relies
      on the html-pipeline Gem (and any related code) and allows for
      extracting of references from multiple HTML nodes in a single pass. This
      means that if you want to extract user references from 200 comments you
      no longer need to run 200 times N number of queries, instead only a
      handful of queries may be needed.
      86166d28