Interface GitHostingService

    • Method Detail

      • createGitRepository

        GitHostedRepository createGitRepository​(String name,
                                                String description,
                                                boolean restricted,
                                                boolean initialize)
                                         throws SecurityException,
                                                TransportException
        Creates a new Git repository for the currently authenticated user.
        Please note that if the service has been configured with repository owner and name those attributes are ignored by this method as the owner is always the authenticated user (the one owning the configured credentials) and the name is always the name attribute.
        Parameters:
        name - the repository name. Cannot be null
        description - the repository description. It may be null
        restricted - when true the repository will have private visibility, otherwise it will be public
        initialize - when true the repository is also initialized (usually with a default README file)
        Returns:
        the object representing the newly created repository
        Throws:
        SecurityException - if authentication or authorization fails or there is no currently authenticated user
        TransportException - if communication to the remote endpoint fails
        UnsupportedOperationException - if the underlying implementation does not support the Service.Feature.GIT_HOSTING feature.
      • deleteGitRepository

        void deleteGitRepository​(String name)
                          throws SecurityException,
                                 TransportException
        Deletes a Git repository for the currently authenticated user.
        Please note that if the service has been configured with repository owner and name those attributes are ignored by this method as the owner is always the authenticated user (the one owning the configured credentials) and the name is always the name attribute.
        Parameters:
        name - the repository name. Cannot be null
        Throws:
        SecurityException - if authentication or authorization fails or there is no currently authenticated user
        TransportException - if communication to the remote endpoint fails
        UnsupportedOperationException - if the underlying implementation does not support the Service.Feature.GIT_HOSTING feature.