- 18 Mar, 2020 40 commits
-
-
Alex Kalderimis authored
This adds validations that ensure that wiki pages cannot have the same canonical slug in the same project. We cannot easily move this check to the DB, so this is handled in logic - we check in `.find_or_create` if either of the known slugs matches a record, and we raise errors on conflict. This also introduces some optimisations that eliminate unnecessary queries. Minor updates from review comments Includes: - Use Class#name instead of constant - Wrap mutable state in an outer transaction The one subtle thing here is that the first query (to find the record) must be within the transaction, even though it does not mutate the state of the DB. This is because we learn important facts from that query (namely whether there are any conflicting canonical slugs) that could be invalidated outside a transaction. - Use standard uniqueness validator This is more declarative than our hand-rolled implementation - Move page construction into factory This requires a new trait for the wiki page factory to create pages that are in the wiki repo. - Changes to some test descriptions - Reduce DB queries in specs we don't strictly need multiple slugs here - one will do. - Avoid running validation if there is no project_id - Raise error if there are no slugs at all
-
Alex Kalderimis authored
-
Alex Kalderimis authored
Add support for wiki page events * Update visibility test * Update action name for wiki page events * Update event specs to use wiki metadata models * Add specific factories This adds a `Policy` for WikiPage::Meta, which is required for interoperation with `Event#visible_to`. The policy is very simple - just delegating to the project.
-
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
-
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.
-
Alex Kalderimis authored
This adds two new tables, `wiki_page_slugs` and `wiki_page_meta` to hold metadata about wiki pages. The string limit for titles is set at our application limit, and the slug limit is set at the maximum valid URL length. The rule that one slug at a time may be canonical for a given page is enforced using a unique index. Adds changelog describing this change.
-
Ash McKenzie authored
Move edition tests to model where they belong See merge request gitlab-org/gitlab!27362
-
Mayra Cabrera authored
Revert "Merge branch '31034-enable-zeitwerk' into 'master'" See merge request gitlab-org/gitlab!27539
-
Robert Speicher authored
Remove feature flag cross_project_need_artifacts See merge request gitlab-org/gitlab!27404
-
Mayra Cabrera authored
Fix Gatsby project template See merge request gitlab-org/gitlab!27538
-
Mayra Cabrera authored
Count total amount of users for each access level See merge request gitlab-org/gitlab!25360
-
Mayra Cabrera authored
Adds metric to derive user creation count See merge request gitlab-org/gitlab!27351
-
Martin Wortschack authored
Resolve "Customizable value stream analytics needs documentation" Closes #211601 See merge request gitlab-org/gitlab!27497
-
Adam Hegyi authored
This commit adds user documentation for the customizable value stream analytics feature.
-
James Fargher authored
Service validation for project and type uniqueness Closes #207385 See merge request gitlab-org/gitlab!26308
-
Andy Soiron authored
This validation prevents duplicated services of the same type in the same project. The validation can only run on create because it is possible that the database holds invalid data. If this is the case, updating a service would fail.
-
Martin Wortschack authored
Merge branch '211453-value-stream-analytics-top-labels-causing-error-when-tasks_by_type_chart-feature-flag-not' into 'master' Value stream analytics - top labels causing error when tasks_by_type_chart feature flag not enabled Closes #211453 See merge request gitlab-org/gitlab!27478
-
Stan Hu authored
Use bash for bin/background_scripts See merge request gitlab-org/gitlab!27534
-
Heinrich Lee Yu authored
This reverts merge request !20521
-
Stan Hu authored
The file was missing a VERSION file and project.json, so it was failing to import. Possible fix for https://gitlab.com/gitlab-org/gitlab/-/issues/31589
-
Paul Slaughter authored
Replace underscore/lodash in design_management Closes #210260 See merge request gitlab-org/gitlab!27248
-
Oswaldo Ferreira authored
The bin/background_jobs_sk_cluster script use some bashisms. In order to avoid issues with either GDK or other systems, here we make use of bash as the default interpreter.
-
Douglas Barbosa Alexandre authored
Enable RSpec/LeakyConstantDeclaration cop See merge request gitlab-org/gitlab!27368
-
Jose Vargas authored
This replaces all underscore usage for lodash inside the EE feature design_management
-
Lin Jen-Shin authored
Make rspec:coverage only download the artifacts it needs Closes #211647 See merge request gitlab-org/gitlab!27493
-
Marcia Ramos authored
Add doc requirement for API development See merge request gitlab-org/gitlab!27383
-
Dmytro Zaporozhets authored
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
Achilleas Pipinellis authored
Fix typo in offline appsec docs See merge request gitlab-org/gitlab!27453
-
Achilleas Pipinellis authored
Threat monitoring docs Closes #211395 See merge request gitlab-org/gitlab!26025
-
Achilleas Pipinellis authored
Docs: update predefined variables usage See merge request gitlab-org/gitlab!27435
-
sameer shaik authored
-
Rémy Coutable authored
Disable correct lint rule Closes #211681 See merge request gitlab-org/gitlab!27521
-
Marcia Ramos authored
OKR: Improve the Markdown page (part 1) Closes #20612, #24731, and gitlab-docs#652 See merge request gitlab-org/gitlab!26663
-
Marcin Sedlak-Jakubowski authored
- Add docs on the Wiki TOC - Enhance inline diff section - Make headings sentence case - Markdown page Vale style fixes - Update TOC image name - Add example to footnote bug - Write emoji as lowercase
-
Kushal Pandya authored
-
Grzegorz Bizon authored
Resolve "CODEOWNERS should enforce reviews for renaming of files" Closes #198061 See merge request gitlab-org/gitlab!26513
-
Bob Van Landuyt authored
Refactor AuditLogFinder public interface See merge request gitlab-org/gitlab!27209
-
Tan Le authored
This concern should belong to the model. It is also consistent with patterns across other models (e.g. Issues, MergeRequests)
-
James Lopez authored
GraphQL: Upgrade to GraphQL-Ruby 1.10 Closes #207278 See merge request gitlab-org/gitlab!26096
-