Class GitHubRepositoryName

  • public class GitHubRepositoryName
    extends Object
    Uniquely identifies a repository on GitHub.
    Kohsuke Kawaguchi
    • Field Detail

      • host

        public final String host
      • userName

        public final String userName
      • repositoryName

        public final String repositoryName
    • Constructor Detail

      • GitHubRepositoryName

        public GitHubRepositoryName​(String host,
                                    String userName,
                                    String repositoryName)
    • Method Detail

      • getHost

        public String getHost()
      • getUserName

        public String getUserName()
      • getRepositoryName

        public String getRepositoryName()
      • resolve

        public Iterable<org.kohsuke.github.GHRepository> resolve()
        Resolves this name to the actual reference by GHRepository Shortcut for resolve(Predicate) with always true predicate (Predicates.alwaysTrue()) as argument
      • resolve

        public Iterable<org.kohsuke.github.GHRepository> resolve​(<GitHubServerConfig> predicate)
        Resolves this name to the actual reference by GHRepository. Since the system can store multiple credentials, and only some of them might be able to see this name in question, this method uses GitHubPluginConfig.findGithubConfig(Predicate) and attempt to find the right credential that can access this repository. Any predicate as argument will be combined with GitHubServerConfig.withHost(String) to find only corresponding for this repo name authenticated github repository This method walks multiple repositories for each credential that can access the repository. Depending on what you are trying to do with the repository, you might have to keep trying until a GHRepository with suitable permission is returned.
        predicate - helps to filter only useful for resolve GitHubServerConfigs
        iterable with lazy login process for getting authenticated repos
      • resolveOne

        public org.kohsuke.github.GHRepository resolveOne()
        Variation of resolve() method that just returns the first valid repository object. This is useful if the caller only relies on the read access to the repository and doesn't need to walk possible candidates.
      • matches

        public boolean matches​(org.kohsuke.github.GHCommitPointer commit)
        Does this repository match the repository referenced in the given GHCommitPointer?
      • matches

        public boolean matches​(org.kohsuke.github.GHRepository repo)
                        throws IOException
        Does this repository match the repository referenced in the given GHCommitPointer?
      • hashCode

        public int hashCode()
        hashCode in class Object