Skip to content
Snippets Groups Projects
  1. Sep 04, 2019
  2. Sep 03, 2019
  3. Aug 30, 2019
  4. Aug 29, 2019
    • Stan Hu's avatar
      Standardize use of `content` parameter in snippets API · fc52421b
      Stan Hu authored
      There was some confusion over whether `code` or `content` is the right
      parameter for snippets. Internally, the database stores
      `content`. However:
      
      1. Project snippets use `code`. `code` gets remapped in `content` in
      `lib/api/project_snippets.rb`.
      
      2. Personal snippets use `content`.
      
      To unify these APIs, allow an alias of `content` to work for project
      snippets.
      
      Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66673
      fc52421b
    • Stan Hu's avatar
      Fix snippets API not working with visibility level · 680f4377
      Stan Hu authored
      When a restricted visibility level of `private` is set in the instance,
      creating a snippet with the `visibility` level would always fail.
      This happened because:
      
      1. `params[:visibility]` was a string (e.g. "public")
      2. `CreateSnippetService` and `UpdateSnippetService` only looked
         at `params[:visibility_level]`, which was `nil`.
      
      To fix this, we:
      
      1. Make `CreateSnippetService` look at the newly-built
         `snippet.visibility_level`, since the right value is assigned by the
         `VisibilityLevel#visibility=` method.
      2. Modify `UpdateSnippetService` to handle both `visibility_level` and
      `visibility` parameters.
      
      Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66050
      680f4377
  5. Aug 28, 2019
  6. Aug 26, 2019
  7. Aug 24, 2019
  8. Aug 23, 2019
  9. Aug 22, 2019
    • Alessio Caiazza's avatar
      Expose namespace storage statistics with GraphQL · 606a1d2d
      Alessio Caiazza authored and Mayra Cabrera's avatar Mayra Cabrera committed
      Root namespaces have storage statistics.
      This commit allows namespace owners to get those stats via GraphQL
      queries like the following one
      
      {
        namespace(fullPath: "a_namespace_path") {
          rootStorageStatistics {
            storageSize
            repositorySize
            lfsObjectsSize
            buildArtifactsSize
            packagesSize
            wikiSize
          }
        }
      }
      606a1d2d
  10. Aug 20, 2019
  11. Aug 19, 2019
  12. Aug 18, 2019
  13. Aug 15, 2019
    • Stan Hu's avatar
      Fix failing N+1 spec in spec/requests/api/discussions_spec.rb · b288f128
      Stan Hu authored
      This test was failing in EE because the API helper `get()` creates a
      personal access token each time it's run. We can avoid that by
      pre-creating a personal access token and passing it each time.
      b288f128
    • Stan Hu's avatar
      Eliminate many Gitaly calls in discussions API · 8044440d
      Stan Hu authored
      Previously, the API to retrieve discussions from merge requests often
      generated hundreds of Gitaly calls to determine whether a system note
      should be shown to the user. It did this by:
      
      1. Rendering the Markdown
      2. Extracting cross-references from the Markdown
      3. For cross-references that were commits, a Gitaly FindCommit RPC
         would be issued to validate that the commit exists.
      
      The last step is unnecessary because we don't need to display a commit
      if the user doesn't have access to the project in the first place.
      
      `RendersNotes#prepare_notes_for_rendering` is already used in
      `MergeRequestsController`, which is why we don't see N+1 Gitaly calls
      there. We use it here to optimize the note redaction process.
      
      Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65957
      8044440d
  14. Aug 14, 2019
  15. Aug 13, 2019
  16. Aug 09, 2019
  17. Aug 08, 2019
  18. Aug 07, 2019
  19. Aug 05, 2019
    • Steve Abrams's avatar
      Add group level container repository endpoints · 3dbf3997
      Steve Abrams authored and Mayra Cabrera's avatar Mayra Cabrera committed
      API endpoints for requesting container repositories
      and container repositories with their tag information
      are enabled for users that want to specify the group
      containing the repository rather than the specific project.
      3dbf3997
  20. Aug 02, 2019
  21. Jul 31, 2019
    • Oswaldo Ferreir's avatar
      Add exclusive lease to mergeability check process · f4cd926c
      Oswaldo Ferreir authored
      Concurrent calls to UserMergeToRef RPC updating a single ref
      can lead to an opaque fail that is being rescued at Gitaly.
      
      So this commit adds an exclusive lease to the mergeability
      check process with the key as the current MR ID.
      f4cd926c
Loading