1. 01 Jun, 2016 26 commits
    • Connor Shea's avatar
      22e7aab8
    • Robert Speicher's avatar
      Merge branch 'style/enable-semicolon-rubocop-cop' into 'master' · 3d3c9c75
      Robert Speicher authored
      Enable Style/Semicolon rubocop style cop
      
      Don't use semicolons to terminate expressions.
      
      See #17478.
      
      See merge request !4351
      3d3c9c75
    • Robert Speicher's avatar
      Merge branch 'rubocop/enable-style-for-cop' into 'master' · 164fc34e
      Robert Speicher authored
      Enable Style/For rubocop cop
      
      > Do not use `for`, unless you know exactly why. Most of the time iterators should be used instead. `for` is implemented in terms of `each` (so you're adding a level of indirection), but with a twist - `for` doesn't introduce a new scope (unlike `each`) and variables defined in its block will be visible outside it.
      
      See #17478
      
      See merge request !4397
      164fc34e
    • Dmitriy Zaporozhets's avatar
      Merge branch 'dz-one-ci-cd-tab' into 'master' · 4621531a
      Dmitriy Zaporozhets authored
      Merge Builds and Pipelines tab into one
      
      Based on https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4053#note_12064642. Main idea is to keep all CI-related pages under one tab. So we can keep top navigation clean. 
      
      First I tried `CI/CD` naming but it looked weird so I just used Pipelines as tab name. I did not change project settings naming. 
      
      cc @ayufan @markpundsack @jschatz1 
      
      See merge request !4340
      4621531a
    • Douwe Maan's avatar
      Merge branch 'separate-banzai-references' into 'master' · 2d084dd8
      Douwe Maan authored
      Separate reference gathering from rendering
      
      This is a required step to allow batch processing when gathering references. This in turn would allow grabbing (for example) all mentioned users of an issue/merge request using a single query.
      
      cc @rspeicher @DouweM 
      
      See merge request !3969
      2d084dd8
    • Yorick Peterse's avatar
      Refactor Participable · 580d2501
      Yorick Peterse authored
      There are several changes to this module:
      
      1. The use of an explicit stack in Participable#participants
      2. Proc behaviour has been changed
      3. Batch permissions checking
      
      == Explicit Stack
      
      Participable#participants no longer uses recursion to process "self" and
      all child objects, instead it uses an Array and processes objects in
      breadth-first order. This allows us to for example create a single
      Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using
      a ReferenceExtractor removes the need for running potentially many SQL
      queries every time a Proc is called on a new object.
      
      == Proc Behaviour Changed
      
      Previously a Proc in Participable was expected to return an Array of
      User instances. This has been changed and instead it's now expected that
      a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return
      value of the Proc is ignored.
      
      == Permissions Checking
      
      The method Participable#participants uses
      Ability.users_that_can_read_project to check if the returned users have
      access to the project of "self" _without_ running multiple SQL queries
      for every user.
      580d2501
    • Douwe Maan's avatar
      Merge branch 'fix-cancelable-retryable' into 'master' · ef6fe42e
      Douwe Maan authored
      Fix cancelability and retriablity of pipeline with generic statuses
      
      Currently it's not possible to cancel or retry generic status since this is external thing to GitLab.
      
      This fixes shown actions of pipelines containing only these actions.
      
      
      See merge request !4380
      ef6fe42e
    • Rémy Coutable's avatar
      Merge branch 'fix/error-500-in-pipeline-when-fork' into 'master' · 4581e71c
      Rémy Coutable authored
      Use project that belongs to pipeline in view
      
      ## What does this MR do?
      
      This MR makes project in pipelines view match the one that pipeline has been created for.
      
      Closes #17943 
      
      See merge request !4376
      4581e71c
    • Douwe Maan's avatar
    • Kamil Trzcinski's avatar
      Fix rubocop offenses · 57992f3d
      Kamil Trzcinski authored
      57992f3d
    • Douwe Maan's avatar
      Merge branch 'emails-on-push-use-sidekiq-mailers' into 'master' · 9d88a3a1
      Douwe Maan authored
      Make EmailsOnPushWorker use Sidekiq mailers queue
      
      A customer was having issues with EmailsOnPushWorker clogging the Sidekiq queues and merge requests not being handled quickly. While researching whether it would possible to spin up a separate Sidekiq task just to handle merge requests and other key functions, I found that this worker was using the default Sidekiq queue. Moving to the `mailers` queue makes it possible to de-prioritize this worker and give more weight to the others.
      
      See merge request !4390
      9d88a3a1
    • Douwe Maan's avatar
      Merge branch 'prefer-to_reference' into 'master' · 173d83ca
      Douwe Maan authored
      Use `Snippet#to_reference` directly
      
      ## What does this MR do?
      
      Instead of hard coding snippet reference, we could just use the existing method for that.
      
      ## Why was this MR needed?
      
      To address https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4338#note_12166325 from @DouweM
      
      /cc @jschatz1 
      
      See merge request !4379
      173d83ca
    • Douwe Maan's avatar
      Merge branch 'rs-remember-me-2fa' into 'master' · 3416bc53
      Douwe Maan authored
      Pass the "Remember me" value to the 2FA token form
      
      Prior, if a user had 2FA enabled and checked the "Remember me" field,
      the setting was ignored because the OTP input was on a new form and the
      value was never passed.
      
      Closes #18000
      
      See merge request !4369
      3416bc53
    • Douwe Maan's avatar
    • Douwe Maan's avatar
      Merge branch 'fix-404-labels-in-todos' into 'master' · c0f19cc9
      Douwe Maan authored
      Fix 404 page when viewing TODOs that contain milestones or labels in different projects
      
      A user viewing the TODOs page will see a 404 if there are mentioned milestones or labels in multiple different projects. This is likely a caching bug and only occurs
      when Markdown rendering occurs across multiple projects, which is why it's so tricky to reproduce. This is what I think is happening:
          
      1. LabelReferenceFilter#references_in encounters label ~X for ProjectA and finds the label in the DB as id = 1.
      2. LabelReferenceFilter.references_in yields [1, 'X', nil, ...]
      3. Since project_ref is nil, AbstractReferenceFilter#project_from_ref_cache caches nil => ProjectA.
      4. LabelReferenceFilter#references_in encounters label ~Y for ProjectB and finds the label in the DB as id = 2.
      5. LabelReferenceFilter.references_in yields [2, 'Y', nil, ...]
      6. AbstractReferenceFilter#project_from_ref_cache lookups nil and returns ProjectA. It was supposed to be ProjectB.
      7. A is the wrong project, so the label lookup fails.
         
      This MR expands the `project_ref` to the right value as soon as we have it to avoid this caching bug.
          
      Closes #17898
      
      
      See merge request !4312
      c0f19cc9
    • Grzegorz Bizon's avatar
      888e6fad
    • Grzegorz Bizon's avatar
      d133175b
    • Grzegorz Bizon's avatar
      02cddaea
    • Grzegorz Bizon's avatar
      24c0f0d6
    • Grzegorz Bizon's avatar
      Enable Style/For rubocop cop · 0319d5b6
      Grzegorz Bizon authored
      Do not use for, unless you know exactly why.
      
      See #17478
      0319d5b6
    • Rémy Coutable's avatar
      Merge branch 'doc_api_services_jira_amend' into 'master' · adcbd001
      Rémy Coutable authored
      Amend jira service api docs [ci skip]
      
      ## What does this MR do?
      
      Amends the API documentation for jira service integration
      
      ## Are there points in the code the reviewer needs to double check?
      
      No
      
      ## Why was this MR needed?
      
      The current documentation omits the username and password parameters
      
      ## What are the relevant issue numbers?
      
      ## Screenshots (if relevant)
      
      See merge request !4382
      adcbd001
    • Rémy Coutable's avatar
      Merge branch 'issue_15557' into 'master' · 46ac3107
      Rémy Coutable authored
      Fix error 500 when sorting issues by milestone due date and filtering by labels
      
      fixes #15557 
      
      See merge request !4327
      46ac3107
    • Dmitriy Zaporozhets's avatar
    • Dmitriy Zaporozhets's avatar
      Merge branch 'rs-event-common-has-tooltip' into 'master' · 8959de25
      Dmitriy Zaporozhets authored
      Add tooltips for common Event feed entries
      
      This adds tooltips to the event target for events like "opened merge
      request !XYZ"
      
      After https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4090#note_11712839, several references in the event feed had titles but were still missing tooltips.
      
      See merge request !4371
      8959de25
    • Grzegorz Bizon's avatar
      Enable Style/Semicolon rubocop style cop · face87b7
      Grzegorz Bizon authored
      See #17478
      face87b7
    • Stan Hu's avatar
      Fix 404 page when viewing TODOs that contain milestones or labels in different projects · f8a3344d
      Stan Hu authored
      A user viewing the TODOs page will see a 404 if there are mentioned labels
      in multiple different projects. This is likely a caching bug and only occurs
      when Markdown rendering occurs across multiple projects, which is why it's so
      tricky to reproduce. This is what I think is happening:
      
      1. LabelReferenceFilter#references_in encounters label ~X for ProjectA and finds the label in the DB as id = 1.
      2. LabelReferenceFilter.references_in yields [1, 'X', nil, ...]
      3. Since project_ref is nil, AbstractReferenceFilter#project_from_ref_cache caches nil => ProjectA.
      4. LabelReferenceFilter#references_in encounters label ~Y for ProjectB and finds the label in the DB as id = 2.
      5. LabelReferenceFilter.references_in yields [2, 'Y', nil, ...]
      6. AbstractReferenceFilter#project_from_ref_cache lookups nil and returns ProjectA. It was supposed to be ProjectB.
      7. A is the wrong project, so the label lookup fails.
      
      This MR caches Markdown references if the key is present.
      
      Closes #17898
      f8a3344d
  2. 31 May, 2016 14 commits