- Jul 08, 2022
-
-
David O'Regan authored
This reverts merge request !81833
-
- Apr 08, 2022
-
-
In this commit we're introducing a new way of registering markups to the Wiki. This way, introducing new ones or handling the existing ones is easier.
-
- Mar 29, 2022
-
-
Francisco Javier López authored
-
- Mar 13, 2022
-
-
Remove the wiki_front_matter Feature flag to add the feature by default. Changelog: added
-
- Mar 04, 2022
-
-
Linjie Zhang authored
-
- Feb 24, 2022
-
-
Vitali Tatarintev authored
Fix and enable `Layout/EmptyLinesAroundAttributeAccessor`
-
- Dec 14, 2021
-
-
- Jul 07, 2021
-
-
Francisco Javier López authored
In this commit we allow wiki pages to be empty (mostly removing the validation in the backend). This aligns the existing behavior because users can push wiki empty pages through git and that will trigger an error because of the existing validator. Changelog: changed
-
- May 14, 2021
-
-
The wiki interface to the Git data leverages the Wiki Service in Gitaly. This service uses LibGit2, and the Ruby sidecar. As such there's a maintainance burden to the Wiki RPCs. This change changes the Gitaly RPC that the `Wiki#versions` call uses to FinddAllCommits. This RPC uses Git itself, and as such will allow the remove of the PageVersions RPC on the Gitaly side in the next release. Furthermore, it's expected that this change resolves other bugs too, for example: #330295 (comment 572087692) In this instance, `git-fsck(1)` can inflate a ZLib'ed Git object, where Libgit2 for some reason fails. While I don't yet know why Libgit2 fails, leveraging the same implementation as `git-fsck(1)` should resolve it. Changelog: changed
-
- Feb 23, 2021
-
-
Alexander Turinske authored
- decouple messaging from error - update tests
-
- Sep 24, 2020
-
-
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.
-
- Aug 04, 2020
-
-
Uday Aggarwal authored
-
Uday Aggarwal authored
-
- Jul 30, 2020
-
-
Markus Koller authored
This new validation didn't work correctly yet because of two reasons: - When loading the wiki page in the `#update` controller action, the content in `attributes[:content]` won't be initialized which causes `content_changed?` to return true. Our factory on the other hand sets `attributes[:content]` as part of its initialization. We can fix this by using `raw_content` instead in `content_changed?`, and verify this in the specs by reloading the existing page from the wiki. - Gollum converts CRLF line endings ("\r\n") to LFs ("\n"), so we also need to do this conversion in `WikiPage#content_changed?`.
-
- Jul 20, 2020
-
-
Adds a new columns on events (fingerprint) and an index on fingerprint and target_type
-
- Jul 17, 2020
-
-
This adds a new validation to restrict the maximum size of a wiki page, which is only enforced when the content is updated, and only when using the GitLab UI or API (not for Git pushes yet). The default limit is 50MB, and can be changed through the Rails console or the API.
-
- Jul 02, 2020
-
-
Steve Mokris authored
Introduces a new `diff` action on the wiki controllers which shows the diff for the selected file and commit. - Add `Gitlab::Diff::FileCollection::WikiPage`. - Override diff helpers in wiki controller. - Unify wiki views: - Always use limited container width. - Always add breadcrumbs for wiki page path. - Show sidebar in diff view. - Align title in diff view with history view. - Add helpers for wiki page headers.
-
- Jun 11, 2020
- Jun 05, 2020
-
-
A page's `title` will be returned from Gollum/Gitaly with any +<> characters changed to -, whereas the `path` preserves these characters. Previously, if a title had one of these characters in it, this method would inaccurately return true, as we would be comparing `my+page` with `my page` (after unhyphenization). #218230
-
- May 08, 2020
-
-
Alex Kalderimis authored
This makes the assumption that a page is valid an error condition, and moves a long chain of accessors to the page model.
-
- Apr 23, 2020
-
-
Markus Koller authored
This is preferred over using instance variables, to avoid e.g. typos.
-
- Apr 16, 2020
-
-
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.
-
- Apr 14, 2020
-
-
Alex Kalderimis authored
This adds wiki page front-matter parsing library code, behind a feature flag. The parser abstracts front-matter recognition and extraction and explanation of failure. The WikiPage model is provided with a new attribute `front_matter`, which is derived from the content. This attribute can be updated and serialized to the wiki-page repository. The feature flag is gated on a project-by-project basis. Front-matter parsing is unified across concerns, by re-using our existing front-matter parsing Regexp in the new front-matter parser, to ensure consistency. A new module, `Gitlab::WikiPages` is used by model and library code. `parse_string` is made a separate method so that different languages can be supported without modifying other code.
-
- Mar 18, 2020
-
-
Alex Kalderimis authored
this was only ever needed in tests, and having it on the actual wiki-page model is just incurring technical debt and installing a permanent footgun. It is removed and replaced with factories. This also refactors the event spec to be much more declarative for visibility tests.
-
Alex Kalderimis authored
Adds wiki page slug model: A slug represents a historical set of slugs that identify wiki pages. At most one can be canonical at any one time, per page. Adds wiki page meta model: The wiki page metadata model contains the current title, and has access to a collection of slugs, at most one of which may be canonical at any one point (all others are historic). Rather than polluting the model namespace, and to clarify the meaning of the class names, these classes are placed under the `WikiPage` namespace. Adds adds wiki page meta/spec factories with sequences for use in the specs, guaranteeing unique titles and slugs
-
Alex Kalderimis authored
Exposes `@user` as `user`, so that the current page author can be identified. Change equality to match other DB objects: pages with equal slugs are equal.
-
- Mar 12, 2020
-
-
Markus Koller authored
If a wiki page is inside a directory with spaces, the change detection didn't account for hyphenated spaces and mistakenly assumed the title was changed when it wasn't, causing a validation error. This also fixes the specs to catch this case.
-
- Mar 03, 2020
-
-
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.
-
- Mar 02, 2020
-
-
Markus Koller authored
Since the directory names can get very long and break the layout if they don't contain spaces, we tweak the `form_errors` helper to optionally truncate some error messages.
-
- Feb 13, 2020
-
-
Markus Koller authored
Many common file systems have a limit of 255 bytes for file and directory names, and while Git and GitLab both support paths exceeding those limits, the presence of them makes it impossible for users on those file systems to checkout a wiki repository locally. To avoid this situation, we enforce these limits when editing pages through the GitLab web interface and API: - 245 bytes for page titles (reserving 10 bytes for the file extension) - 255 bytes for directory names
-
- Dec 16, 2019
-
-
Mark Chao authored
Link ActiveModel Blob classes to policy
-
- Nov 05, 2019
-
-
Zeger-Jan van de Weg authored
This RPC has gone unused as far as I can see, so I'm removing it to decrease the API surface for Gitaly.
-
- Oct 31, 2019
-
-
Alex Kalderimis authored
This reverts commit d8fafdf5.
-
- Oct 23, 2019
-
-
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.
-
- Oct 17, 2019
-
-
Luke Duncalfe authored
Previously, when the wiki page format was anything other than `markdown` or `asciidoc` the formatted content would be returned though a Gitaly call. Gitaly in turn would delegate formatting to the gitlab-gollum-lib gem, which in turn would delegate that to various gems (like RDoc for `rdoc`) and then apply some very liberal sanitization. It was too liberal! This change brings our wiki content formatting in line with how we format other markdown at GitLab, so we have a SSOT for sanitization. #30540
-
- Sep 25, 2019
-
-
Arturo Herrero authored
We are currently using Object#presence in many places (>65). This commit fixes the Rubocop TODO offenses running rubocop --auto-correct.
-
- Apr 12, 2019
-
-
Igor Drozdov authored
If a page has the same name as a directory the WikiPage#group_by_directory method can have a wrong behaviour This commit fixes it
-
- Apr 04, 2019
-
-
Igor Drozdov authored
- Add controls for sorting by title and date - Execute Gitaly call which now accepts sorting params for wikis
-
Igor Drozdov authored
- Add controls for sorting by title and date - Execute Gitaly call which now accepts sorting params for wikis
-
- Mar 06, 2019
-
-
Andrew Newdigate authored
This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points. Style change discussed in https://gitlab.com/gitlab-org/gitlab-ce/issues/57454
-