1. 02 6月, 2016 20 次提交
  2. 01 6月, 2016 20 次提交
    • D
      Merge branch 'separate-banzai-references' into 'master' · 2d084dd8
      Douwe Maan 提交于
      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
    • Y
      Refactor Participable · 580d2501
      Yorick Peterse 提交于
      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
    • D
      Merge branch 'fix-cancelable-retryable' into 'master' · ef6fe42e
      Douwe Maan 提交于
      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
      Merge branch 'fix/error-500-in-pipeline-when-fork' into 'master' · 4581e71c
      Rémy Coutable 提交于
      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
    • R
      Don't advertise the use of "ci skip" in the CONTRIBUTING guide · ea80259b
      Rémy Coutable 提交于
      Now that we autoscale runner, we don't need to optimize for their usage
      anymore. Abusing of "ci skip", for instance for view changes can lead to
      broken specs, so let's just not use it!
      Signed-off-by: NRémy Coutable <remy@rymai.me>
      ea80259b
    • D
    • K
      Fix rubocop offenses · 57992f3d
      Kamil Trzcinski 提交于
      57992f3d
    • D
      Merge branch 'emails-on-push-use-sidekiq-mailers' into 'master' · 9d88a3a1
      Douwe Maan 提交于
      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
    • D
      Merge branch 'prefer-to_reference' into 'master' · 173d83ca
      Douwe Maan 提交于
      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
    • D
      Merge branch 'rs-remember-me-2fa' into 'master' · 3416bc53
      Douwe Maan 提交于
      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
    • D
      4a50e1f0
    • D
      Merge branch 'fix-404-labels-in-todos' into 'master' · c0f19cc9
      Douwe Maan 提交于
      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
    • G
      Add Changelog entry for links fix on pipeline page · 888e6fad
      Grzegorz Bizon 提交于
      888e6fad
    • G
      User internal pipeline to access project in views · d133175b
      Grzegorz Bizon 提交于
      d133175b
    • G
      Add feature specs for pipeline in MR from fork · 02cddaea
      Grzegorz Bizon 提交于
      02cddaea
    • G
      24c0f0d6
    • G
      Enable Style/For rubocop cop · 0319d5b6
      Grzegorz Bizon 提交于
      Do not use for, unless you know exactly why.
      
      See #17478
      0319d5b6
    • R
      Merge branch 'doc_api_services_jira_amend' into 'master' · adcbd001
      Rémy Coutable 提交于
      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
      Merge branch 'issue_15557' into 'master' · 46ac3107
      Rémy Coutable 提交于
      Fix error 500 when sorting issues by milestone due date and filtering by labels
      
      fixes #15557 
      
      See merge request !4327
      46ac3107
    • D
      cb261abe