Class GithubRepositoryServiceImpl
java.lang.Object
com.winchesters.devopsify.service.technologies.github.GithubRepositoryServiceImpl
- All Implemented Interfaces:
GithubRepositoryService
@Service
@Transactional
public class GithubRepositoryServiceImpl
extends Object
implements GithubRepositoryService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanalyseGithub(Project project) analyse github repositoryorg.kohsuke.github.GHRepositorycreateRepository(GithubRepositoryDto githubRepositoryDto) create a new repository in githubcreateWebHook(Project project, String token) voidDeprecated.uses the username in github object that may not existvoiddeleteAllRepositories(String username) voiddeleteGithubRepository(String name) Deprecated.please set the owner's namevoiddeleteGithubRepository(String owner, String name) deletes a github repositorystatic void
-
Constructor Details
-
GithubRepositoryServiceImpl
public GithubRepositoryServiceImpl()
-
-
Method Details
-
createRepository
public org.kohsuke.github.GHRepository createRepository(GithubRepositoryDto githubRepositoryDto) throws IOException Description copied from interface:GithubRepositoryServicecreate a new repository in github- Specified by:
createRepositoryin interfaceGithubRepositoryService- Parameters:
githubRepositoryDto- an object containing name, owner, autoInit, licenseTemplate, gitIgnoreTemplate attributes- Returns:
- the created repository
- Throws:
IOException- : connection problems
-
analyseGithub
Description copied from interface:GithubRepositoryServiceanalyse github repository- Specified by:
analyseGithubin interfaceGithubRepositoryService- Parameters:
project- the correspondent project- Returns:
- a githubAnalyseResults that contains readMe/license/gitignore ... analysis
- Throws:
IOException- if any problem while connecting to the github api
-
test
- Throws:
IOException
-
deleteGithubRepository
deletes a github repository- Parameters:
owner- the repository owner's namename- the name of the repository- Throws:
IOException- when io exceptions
-
deleteGithubRepository
Deprecated.please set the owner's name- Parameters:
name- the name of the repository- Throws:
IOException- when io exceptions
-
deleteAllRepositories
- Parameters:
username- github username- Throws:
IOException- when io exceptions
-
deleteAllRepositories
Deprecated.uses the username in github object that may not exist- Throws:
IOException- when io exceptions
-
createWebHook
- Throws:
IOException
-
main
- Throws:
IOException
-