Commit 0c28ad69 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

gitlab: fix return types for hook queries

These actually return `ProjectHook` entities.
parent 77f3d36f
......@@ -160,12 +160,12 @@ impl Gitlab {
}
/// Get a project's hooks.
pub fn hooks(&self, project: ProjectId) -> Result<Vec<Hook>> {
pub fn hooks(&self, project: ProjectId) -> Result<Vec<ProjectHook>> {
self._get_paged(&format!("projects/{}/hooks", project))
}
/// Get a project hook.
pub fn hook(&self, project: ProjectId, hook: HookId) -> Result<Hook> {
pub fn hook(&self, project: ProjectId, hook: HookId) -> Result<ProjectHook> {
self._get(&format!("projects/{}/hooks/{}", project, hook))
}
......@@ -190,7 +190,7 @@ impl Gitlab {
}
/// Add a project hook.
pub fn add_hook(&self, project: ProjectId, url: &str, events: WebhookEvents) -> Result<Hook> {
pub fn add_hook(&self, project: ProjectId, url: &str, events: WebhookEvents) -> Result<ProjectHook> {
let mut flags = Self::event_flags(events);
flags.push(("url", url));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment