mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-06 08:21:23 +00:00
24 lines
504 B
Java
24 lines
504 B
Java
package org.kohsuke.github;
|
|
|
|
class GHRepoHook extends GHHook {
|
|
/**
|
|
* Repository that the hook belongs to.
|
|
*/
|
|
transient GHRepository repository;
|
|
|
|
GHRepoHook wrap(GHRepository owner) {
|
|
this.repository = owner;
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
GitHub getRoot() {
|
|
return repository.root;
|
|
}
|
|
|
|
@Override
|
|
String getApiRoute() {
|
|
return String.format("/repos/%s/%s/hooks/%d", repository.getOwnerName(), repository.getName(), getId());
|
|
}
|
|
}
|