summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-03 21:08:37 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-03 21:08:37 +0000
commitbbaf2bb0438b1c71020d9d216feb528add225a7f (patch)
tree47409ddbb4994ec78c24503416ab44f129f39ec6 /doc
parente9c2bf267862e22c0770cc7b3a1ed97a8b87a7fd (diff)
downloadgitlab-ce-bbaf2bb0438b1c71020d9d216feb528add225a7f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/api/graphql/reference/gitlab_schema.graphql6
-rw-r--r--doc/api/graphql/reference/gitlab_schema.json6
-rw-r--r--doc/development/application_limits.md20
3 files changed, 19 insertions, 13 deletions
diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql
index 808d54fd86b..d6a0cc97e25 100644
--- a/doc/api/graphql/reference/gitlab_schema.graphql
+++ b/doc/api/graphql/reference/gitlab_schema.graphql
@@ -4831,16 +4831,16 @@ enum MilestoneStateEnum {
}
"""
-The position the adjacent object should be moved.
+The position to which the adjacent object should be moved
"""
enum MoveType {
"""
- The adjacent object will be moved after the object that is being moved.
+ The adjacent object will be moved after the object that is being moved
"""
after
"""
- The adjacent object will be moved before the object that is being moved.
+ The adjacent object will be moved before the object that is being moved
"""
before
}
diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json
index b7fa9b21320..4429bc6621d 100644
--- a/doc/api/graphql/reference/gitlab_schema.json
+++ b/doc/api/graphql/reference/gitlab_schema.json
@@ -24550,20 +24550,20 @@
{
"kind": "ENUM",
"name": "MoveType",
- "description": "The position the adjacent object should be moved.",
+ "description": "The position to which the adjacent object should be moved",
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": [
{
"name": "before",
- "description": "The adjacent object will be moved before the object that is being moved.",
+ "description": "The adjacent object will be moved before the object that is being moved",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "after",
- "description": "The adjacent object will be moved after the object that is being moved.",
+ "description": "The adjacent object will be moved after the object that is being moved",
"isDeprecated": false,
"deprecationReason": null
}
diff --git a/doc/development/application_limits.md b/doc/development/application_limits.md
index c3bfe20dd87..dd07a9cbfb7 100644
--- a/doc/development/application_limits.md
+++ b/doc/development/application_limits.md
@@ -15,10 +15,6 @@ limits](https://about.gitlab.com/handbook/product/#introducing-application-limit
## Development
-The merge request to [configure maximum number of webhooks per
-project](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/20730/diffs) is a
-good example about configuring application limits.
-
### Insert database plan limits
In the `plan_limits` table, you have to create a new column and insert the
@@ -78,12 +74,22 @@ can be used to validate that a model does not exceed the limits. It ensures
that the count of the records for the current model does not exceed the defined
limit.
-NOTE: **Note:** The name (pluralized) of the plan limit introduced in the
-database (`project_hooks`) must correspond to the name of the model we are
-validating (`ProjectHook`).
+NOTE: **Note:** You must specify the limit scope of the object being validated
+and the limit name if it's different from the pluralized model name.
```ruby
class ProjectHook
include Limitable
+
+ self.limit_name = 'project_hooks' # Optional as ProjectHook corresponds with project_hooks
+ self.limit_scope = :project
+end
+```
+
+To test the model, you can include the shared examples.
+
+```ruby
+it_behaves_like 'includes Limitable concern' do
+ subject { build(:project_hook, project: create(:project)) }
end
```