An error occurred fetching the project authors.
  1. 26 Apr, 2021 1 commit
  2. 21 Apr, 2021 1 commit
  3. 07 Apr, 2021 1 commit
  4. 17 Mar, 2021 1 commit
  5. 12 Mar, 2021 1 commit
  6. 11 Mar, 2021 1 commit
    • Zeger-Jan van de Weg's avatar
      Wiki: #find_file defaults to HEAD over master · 5e4e3660
      Zeger-Jan van de Weg authored
      Gitaly will find Wiki files is requested to do so, and by default if no
      revision is set, it will set the revision to `master`. Given the Git
      community is moving towards `main` instead, this change sets the default
      to HEAD.
      
      This works as GitLab stores repositories in their bare format, and
      effectively there's no HEAD. Git itself really likes there to be a HEAD,
      and this thus points to the default branch name. Nowadays usually
      `refs/heads/master`, in the future probably: `refs/heads/main`.
      5e4e3660
  7. 12 Feb, 2021 1 commit
  8. 25 Jan, 2021 1 commit
  9. 19 Jan, 2021 1 commit
    • Francisco Javier López's avatar
      Move Housekeeping service namespace · e900a588
      Francisco Javier López authored
      In this commit we're moving the `Projects::HousekeepingService`
      to `HousekeepingService`. We're doing this because we're going
      to reuse it with other resources like project and group wikis.
      
      We cannot remove the service class entirely because during
      deployment there can be jobs calling the old class.
      e900a588
  10. 13 Jan, 2021 1 commit
  11. 05 Oct, 2020 1 commit
    • Markus Koller's avatar
      Use Wiki instance as repository container · 00dff848
      Markus Koller authored
      Before we started working on group wikis, `ProjectWiki` used a `Project`
      instance as the container of its `Repository` instance, so for group
      wikis we did the same with `Group`.
      
      This initially made sense and also mostly aligned with the semantics for
      `Repository#container`, but while working on wiki diffing [1] we noticed
      that the `Commit` and `Blob` classes sometimes use
      `container#repository`, which breaks some assumptions and also causes
      redundant Gitaly calls to the project repository when diffing wikis.
      
      Refactoring those classes is a lot riskier and would affect other
      features too, so in this commit we're instead changing the
      `Repository#container` to be the wiki instance, rather than the project
      or group. This generally seems to make sense anyway, and only needs some
      small adjustments.
      
      To satisfy the interface for `Repository#container`, we need to add
      or tweak some methods:
      
      - `Wiki.find_by_id`
      - `Wiki#id`
      - `Wiki#to_global_id`
      
      We also still need to be able to resolve wiki repositories from their
      containers, this is handled in the repository resolver for
      `Gitlab::GlRepository::WIKI`.
      
      [1] https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35330
      00dff848
  12. 25 Sep, 2020 1 commit
    • Luke Duncalfe's avatar
      Optimise WikiPage spec · e5699ae1
      Luke Duncalfe authored
      Locally the spec has reduced from ~45s to ~14s.
      
      We used to spend ~35s creating 416 factories, and we now spend ~3s
      creating 43 factories.
      e5699ae1
  13. 24 Sep, 2020 1 commit
    • Markus Koller's avatar
      Show wiki tree structure in sidebar and pages overview · 4915fd9b
      Markus Koller authored
      Replaces `WikiPage.group_by_directory` with `WikiDirectory.group_pages`,
      which groups the pages recursively by their path.
      
      The views were already set up for recursive partials, so we only had
      to change them to show the basename of each directory, rather than
      their full path. This is done through a new `WikiDirectory#title`
      helper.
      4915fd9b
  14. 09 Sep, 2020 1 commit
    • Markus Koller's avatar
      Refactor PostReceive hooks for group wikis · f5bc1b08
      Markus Koller authored
      This prepares the service and worker classes for post-processing of
      group wikis, though we're not actually implementing any custom behaviour
      for group wikis yet.
      
      Wiki models:
      
      - Move `HasWiki#after_wiki_activity` into `Wiki#after_wiki_activity`,
        and add `Wiki#after_post_receive` for container-specific background
        processing.
      
      PostReceive worker:
      
      - Move project-specific code into `ProjectWiki#after_post_receive`.
      - Tweak check for project snippets with a missing project, to avoid
        catching group wikis.
      - Remove redundant specs for ES indexing, which is already covered
        elsewhere.
      
      Git::WikiPushService (also in EE):
      
      - Change the service to take the wiki as its main argument.
      - For group wikis, don't attempt to create events, index Elasticsearch,
        or run Geo services.
      f5bc1b08
  15. 07 Sep, 2020 1 commit
  16. 14 Aug, 2020 1 commit
    • Alex Kalderimis's avatar
      Ensure HasWiki constructs wikis with users as owners · 4577f7af
      Alex Kalderimis authored
      This adds a concept of `default_actor` that `HasWiki` instances must
      implement. This is implemented differently for projects and groups.
      The contract is that `default_actor` must return a User with ownership
      privileges over the object.
      
      Wiki Owner differs from Owner of these models as wiki_owner must have
      the type `User`, but `Project#owner` can be a `Group` for instance.
      Groups can have many owners, so we select the first one, before
      ascending the chain of parent groups.
      
      This is vital since otherwise `HasWiki#wiki` will return wikis that
      cannot save their own pages.
      4577f7af
  17. 04 Jun, 2020 1 commit
    • Markus Koller's avatar
      Fix relative URL root in wiki_base_path · 9a748ec1
      Markus Koller authored
      This was a bug introduced in fe5533a7.
      
      Previously we were building the path manually and had to also include
      `Gitlab.config.gitlab.relative_url_root`, but since we're using route
      helpers now it's already included via `default_url_options`, which
      resulted in a duplicated root in the URL.
      9a748ec1
  18. 14 May, 2020 1 commit
  19. 27 Apr, 2020 1 commit
    • Markus Koller's avatar
      Correctly count wiki pages in sidebar · aad68a0d
      Markus Koller authored
      The existing code had two problems:
      
      - We were only counting toplevel entries, not individual pages.
      - We were showing the "View All Pages" button when the number of pages
        exactly matches the limit, even when there are no further pages.
      
      This is now resolved by loading one page more than the limit, and using
      the result count to determine if we have more pages.
      aad68a0d
  20. 16 Apr, 2020 1 commit
    • Markus Koller's avatar
      Add group wiki model · fe5533a7
      Markus Koller authored
      - Refactor existing `ProjectWiki` into `Wiki`, and add new child classes
        `ProjectWiki` and `GroupWiki`.
      - Rename `project` to `container` in the wiki classes.
      - Add `HasWiki` concern for use in `Project` and `Group`.
      - Add `@groups` prefix in `Storage::Hashed`.
      - Refactor existing specs into shared examples.
      fe5533a7
  21. 07 Apr, 2020 1 commit
  22. 06 Apr, 2020 1 commit
    • Markus Koller's avatar
      Support more types in UrlBuilder · 10afe1b0
      Markus Koller authored
      - Add support for projects and groups.
      - Add support for building path-only URLs.
      - Reuse it in `HasRepository#web_url`.
      - Remove state and turn the class into a singleton.
      - Provide a default instance in presenters.
      - Rewrite specs with parameterized table syntax.
      10afe1b0
  23. 03 Apr, 2020 1 commit
    • Markus Koller's avatar
      Tweak some factories to support stubbing · 5f4ed797
      Markus Koller authored
      - Use `association()` instead of `create()` in association blocks,
        to avoid enforcing the builder strategy.
      - Pass on `project` in association blocks instead of `after` callbacks.
      - Add `has_internal_id` trait to generate IIDs on stubbed models.
      - Add `ProjectWiki#id` accessor.
      - Rename `discussion_note_on_snippet` to `*_project_snippet`, for
        consistency with the `note_*` factories.
      - Add `#sha` on stubbed commits in `RepoHelpers`.
      5f4ed797
  24. 18 Mar, 2020 1 commit
  25. 13 Mar, 2020 2 commits
    • Nick Thomas's avatar
      Remove GitlabShell#create_repository and wrappers · c861a0a0
      Nick Thomas authored
      Project repository and wiki repository creation was indirected through
      Gitlab::Shell unnecessarily. `GitlabShell#create_repository` build an
      (incomplete) `Gitlab::Git::Repository` to run the creation code, but
      all users already had access to `Repository` instances.
      c861a0a0
    • Nick Thomas's avatar
      Promote Gitlab::Shell#url_to_repo to a class method · b29eed55
      Nick Thomas authored
      This method is a static transformation of its arguments so it makes
      more sense as a class method - no need for a Gitlab::Shell instance.
      
      This allows us to remove `Gitlab::ShellAdapter` from a few places.
      b29eed55
  26. 03 Mar, 2020 1 commit
    • Markus Koller's avatar
      Tweak wiki page title handling · d2780da0
      Markus Koller authored
      - Add specs for handling of special characters.
      - Fix `title_changed?` for all cases.
      - Remove redundant `persisted` argument.
      - Don't unescape title returned by gollum, it's not escaped anymore now.
      d2780da0
  27. 25 Feb, 2020 1 commit
    • Nick Thomas's avatar
      Make Repository track shard · aed980e7
      Nick Thomas authored
      This makes a transitive dependency direct, and is a first step towards
      removing `::Repository#{project,container}`
      aed980e7
  28. 27 Jan, 2020 1 commit
    • Francisco Javier López's avatar
      Refactor gl_repository class · cd1ea380
      Francisco Javier López authored
      The repository disk path does't include any suffix
      but GlRepository automatically adds it unless it is
      a project one.
      
      Since we're adding more repository types that won't
      include any suffix and aren't a project type
      either, we need a way to set this.
      cd1ea380
  29. 20 Jan, 2020 1 commit
  30. 16 Jan, 2020 1 commit
  31. 05 Dec, 2019 1 commit
  32. 05 Nov, 2019 1 commit
  33. 31 Oct, 2019 1 commit
  34. 23 Oct, 2019 1 commit
    • Alex Kalderimis's avatar
      Improve wiki page grouping · d8fafdf5
      Alex Kalderimis authored
      This uses an intermediate index to transform the function from `O(n^2)`
      to `O(n.logn)`, which will be very important for large wikis with lots
      of directories, which is definitely something we want to support.
      d8fafdf5
  35. 21 Oct, 2019 1 commit
  36. 17 Oct, 2019 2 commits
  37. 20 Aug, 2019 1 commit
  38. 30 Jul, 2019 1 commit
    • Yorick Peterse's avatar
      Inject EE modules in a CE compatible fashion · 1112fec4
      Yorick Peterse authored
      All instances of injecting an EE specific module have been changed to
      use the new methods for this: prepend_if_ee, extend_if_ee, and
      include_if_ee. This allows these lines to be included in CE, even when
      the modules to inject do not exist. This in turn allows us to backport
      these lines to CE and keep them there, instead of having to strip them
      out.
      1112fec4