Skip to content
Snippets Groups Projects
Commit fec7cd39 authored by Phawin Khongkhasawan's avatar Phawin Khongkhasawan
Browse files

Apply 4 suggestion(s) to 2 file(s)

parent e6e9750d
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !151048. Comments created here will be created in the context of that merge request.
......@@ -1778,7 +1778,7 @@ GET /groups/:id/hooks/:hook_id
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/151048) in GitLab 17.1.
Get a list of events for a specific project hook.
Get a list of events for a specific group hook.
```plaintext
GET /groups/:id/hooks/:hook_id/events
......@@ -1801,14 +1801,14 @@ GET /groups/:id/hooks/:hook_id/events
"User-Agent": "GitLab/17.1.0-pre",
"X-Gitlab-Event": "Push Hook",
"X-Gitlab-Webhook-UUID": "3c5c0404-c866-44bc-a5f6-452bb1bfc76e",
"X-Gitlab-Instance": "http://gdk.test:3000",
"X-Gitlab-Instance": http://gitlab.example.com",
"X-Gitlab-Event-UUID": "9cebe914-4827-408f-b014-cfa23a47a35f",
"X-Gitlab-Token": "[REDACTED]"
},
"request_data": {
"object_kind": "push",
"event_name": "push",
"before": "468abc807a2b2572f43e72c743b76cee6db24025",
"event_name": "push"
}
"after": "f15b32277d2c55c6c595845a87109b09c913c556",
"ref": "refs/heads/master",
"ref_protected": true,
......
......@@ -13,7 +13,10 @@ class Events < ::Grape::API
{ code: 403, message: 'Forbidden' }
]
end
params do
# Overrides the original definition to add the `values: 1..20` restriction
optional :per_page, type: Integer, default: 20,
desc: 'Number of items per page', documentation: { example: 20 },
values: 1..20
optional :status,
type: Array[String],
coerce_with: Validations::Types::CommaSeparatedToArray.coerce,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment