All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kohsuke.github.GHRepoHook Maven / Gradle / Ivy

There is a newer version: 2.0.0-alpha-2
Show newest version
package org.kohsuke.github;

// TODO: Auto-generated Javadoc
/**
 * The Class GHRepoHook.
 */
class GHRepoHook extends GHHook {
    /**
     * Repository that the hook belongs to.
     */
    transient GHRepository repository;

    /**
     * Wrap.
     *
     * @param owner
     *            the owner
     * @return the GH repo hook
     */
    GHRepoHook wrap(GHRepository owner) {
        this.repository = owner;
        return this;
    }

    /**
     * Root.
     *
     * @return the git hub
     */
    @Override
    GitHub root() {
        return repository.root();
    }

    /**
     * Gets the api route.
     *
     * @return the api route
     */
    @Override
    String getApiRoute() {
        return String.format("/repos/%s/%s/hooks/%d", repository.getOwnerName(), repository.getName(), getId());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy