java.lang.Object
org.kohsuke.github.AbstractGitHubWireMockTest
org.kohsuke.github.GHRepositoryTest
The Class GHRepositoryTest.
- Author:
- Liam Newman
-
Nested Class Summary
Nested classes/interfaces inherited from class org.kohsuke.github.AbstractGitHubWireMockTest
AbstractGitHubWireMockTest.TemplatingHelper
-
Field Summary
Fields inherited from class org.kohsuke.github.AbstractGitHubWireMockTest
baseFilesClassPath, baseRecordPath, gitHub, mockGitHub, tempGitHubRepositories, templating, useDefaultGitHub
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the collaborators.void
Adds the collaborators repo perm.void
archive()
Archive.void
Test demoing the issue with a user having the maintain permission on a repository.void
Check stargazers count.void
Check watchers count.void
Creates the dispatch event with client payload.void
Creates the dispatch event without client payload.void
Creates the secret.void
Creates the signed commit unknown signature type.void
Creates the signed commit verify error.void
Gets the branch URL encoded.void
Gets the branch non existent but 200 status.void
Gets the check runs.void
Filter out the checks from a referencevoid
Gets the collaborators.void
Gets the commits between over 250.void
Gets the commits between paged.void
Gets the delete branch on merge.void
Gets the last commit status.void
Gets the permission.void
Gets the post commit hooks.void
Gets the public key.void
getRef()
Gets the ref.void
getRefs()
Gets the refs.void
Gets the refs empty tags.void
Gets the refs heads.void
Gets the release by tag name does not exist.void
Gets the release by tag name exists.void
Gets the release does not exist.void
Gets the release exists.protected GHRepository
Gets the repository.void
Gh repository search builder fork default reset forks search terms.void
Gh repository search builder ignores unknown visibility.void
Checks for permission.void
Checks if is disabled.void
Checks if is disabled true.void
Latest repository exist.void
Latest repository not exist.void
List collaborators.void
List collaborators filtered.void
List commit comments no comments.void
List commit comments some comments.void
List commits between.void
List commits between paginated.void
List contributors.void
List empty contributors.void
List languages.void
listRefs()
List refs.void
List refs empty tags.void
List refs heads.void
List releases.void
List stargazers.void
listTags()
List tags.void
List tags empty.void
markDown()
Mark down.void
Search all public and forked repos.void
Search for public forked only repos.void
Search org for repositories.void
Search repositories.void
Sets the delete branch on merge.void
Sets the merge options.void
starTest()
Test to check star method by verifying stargarzer count.void
Subscription.void
sync()
Test sync of forkvoid
Test sync of repository not a forkvoid
Test create repo action variable.void
Tests the creation of repositories with alternating visibilities for orgs.void
Tests the creation of repositories with alternating visibilities for users.void
Test delete repo action variable.void
Test get repository with visibility.void
Test getRulesForBranch.void
Test getters.void
Test getTopReferralPaths.void
Test getTopReferralSources.void
Test issue 162.void
Test getVulnerabilityAlerts.void
Test searching for pull requests.void
Test set public.void
Test set topics.void
Test tarball.void
Test update repo action variable.void
Test update repository.void
Test zipball.void
User is collaborator.Methods inherited from class org.kohsuke.github.AbstractGitHubWireMockTest
assertThat, assertThat, assertThat, cleanupRepository, cleanupTempRepositories, fail, fail, getGitHubBuilder, getNonRecordingGitHub, getTempRepository, getTempRepository, getUser, getUser, getWireMockOptions, kohsuke, requireProxy, snapshotNotAllowed, verifyAuthenticated, wireMockSetup
-
Constructor Details
-
GHRepositoryTest
public GHRepositoryTest()Create default GHRepositoryTest instance
-
-
Method Details
-
getRepository
Gets the repository.- Returns:
- the repository
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
sync
Test sync of fork- Throws:
IOException
- Signals that an I/O exception has occurred.
-
syncNoFork
Test sync of repository not a fork- Throws:
IOException
- Signals that an I/O exception has occurred.
-
testZipball
Test zipball.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
testTarball
Test tarball.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
testGetters
Test getters.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
archive
Archive.- Throws:
Exception
- the exception
-
isDisabled
Checks if is disabled.- Throws:
Exception
- the exception
-
isDisabledTrue
Checks if is disabled true.- Throws:
Exception
- the exception
-
getBranch_URLEncoded
Gets the branch URL encoded.- Throws:
Exception
- the exception
-
createSignedCommitVerifyError
Creates the signed commit verify error.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
createSignedCommitUnknownSignatureType
Creates the signed commit unknown signature type.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
listStargazers
List stargazers.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getBranchNonExistentBut200Status
Gets the branch non existent but 200 status.- Throws:
Exception
- the exception
-
subscription
Subscription.- Throws:
Exception
- the exception
-
testSetPublic
Test set public.- Throws:
Exception
- the exception
-
testCreateVisibilityForOrganization
Tests the creation of repositories with alternating visibilities for orgs.- Throws:
Exception
- the exception
-
testCreateVisibilityForUser
Tests the creation of repositories with alternating visibilities for users.- Throws:
Exception
- the exception
-
testUpdateRepository
Test update repository.- Throws:
Exception
- the exception
-
testGetRepositoryWithVisibility
Test get repository with visibility.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
listContributors
List contributors.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getPermission
Gets the permission.- Throws:
Exception
- the exception
-
hasPermission
Checks for permission.- Throws:
Exception
- the exception
-
LatestRepositoryExist
public void LatestRepositoryExist()Latest repository exist. -
addCollaborators
Adds the collaborators.- Throws:
Exception
- the exception
-
addCollaboratorsRepoPerm
Adds the collaborators repo perm.- Throws:
Exception
- the exception
-
LatestRepositoryNotExist
public void LatestRepositoryNotExist()Latest repository not exist. -
listReleases
List releases.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getReleaseExists
Gets the release exists.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getReleaseDoesNotExist
Gets the release does not exist.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getReleaseByTagNameExists
Gets the release by tag name exists.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getReleaseByTagNameDoesNotExist
Gets the release by tag name does not exist.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
listLanguages
List languages.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
listCommitCommentsNoComments
List commit comments no comments.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
searchAllPublicAndForkedRepos
Search all public and forked repos.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
searchForPublicForkedOnlyRepos
Search for public forked only repos.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
ghRepositorySearchBuilderIgnoresUnknownVisibility
public void ghRepositorySearchBuilderIgnoresUnknownVisibility()Gh repository search builder ignores unknown visibility. -
ghRepositorySearchBuilderForkDefaultResetForksSearchTerms
public void ghRepositorySearchBuilderForkDefaultResetForksSearchTerms()Gh repository search builder fork default reset forks search terms. -
listCommitCommentsSomeComments
List commit comments some comments.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
listEmptyContributors
List empty contributors.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
searchRepositories
Search repositories.- Throws:
Exception
- the exception
-
searchOrgForRepositories
Search org for repositories.- Throws:
Exception
- the exception
-
testIssue162
Test issue 162.- Throws:
Exception
- the exception
-
markDown
Mark down.- Throws:
Exception
- the exception
-
setMergeOptions
Sets the merge options.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getDeleteBranchOnMerge
Gets the delete branch on merge.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
setDeleteBranchOnMerge
Sets the delete branch on merge.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
testSetTopics
Test set topics.- Throws:
Exception
- the exception
-
getCollaborators
Gets the collaborators.- Throws:
Exception
- the exception
-
getPostCommitHooks
Gets the post commit hooks.- Throws:
Exception
- the exception
-
getRefs
Gets the refs.- Throws:
Exception
- the exception
-
getPublicKey
Gets the public key.- Throws:
Exception
- the exception
-
getRefsHeads
Gets the refs heads.- Throws:
Exception
- the exception
-
getRefsEmptyTags
Gets the refs empty tags.- Throws:
Exception
- the exception
-
listRefs
List refs.- Throws:
Exception
- the exception
-
getRef
Gets the ref.- Throws:
Exception
- the exception
-
listRefsHeads
List refs heads.- Throws:
Exception
- the exception
-
listRefsEmptyTags
List refs empty tags.- Throws:
Exception
- the exception
-
listTagsEmpty
List tags empty.- Throws:
Exception
- the exception
-
listTags
List tags.- Throws:
Exception
- the exception
-
checkWatchersCount
Check watchers count.- Throws:
Exception
- the exception
-
checkStargazersCount
Check stargazers count.- Throws:
Exception
- the exception
-
listCollaborators
List collaborators.- Throws:
Exception
- the exception
-
listCollaboratorsFiltered
List collaborators filtered.- Throws:
Exception
- the exception
-
userIsCollaborator
User is collaborator.- Throws:
Exception
- the exception
-
getCheckRuns
Gets the check runs.- Throws:
Exception
- the exception
-
getCheckRunsWithParams
Filter out the checks from a reference- Throws:
Exception
- the exception
-
getLastCommitStatus
Gets the last commit status.- Throws:
Exception
- the exception
-
listCommitsBetween
List commits between.- Throws:
Exception
- the exception
-
listCommitsBetweenPaginated
List commits between paginated.- Throws:
Exception
- the exception
-
getCommitsBetweenOver250
Gets the commits between over 250.- Throws:
Exception
- the exception
-
getCommitsBetweenPaged
Gets the commits between paged.- Throws:
Exception
- the exception
-
createDispatchEventWithoutClientPayload
Creates the dispatch event without client payload.- Throws:
Exception
- the exception
-
createDispatchEventWithClientPayload
Creates the dispatch event with client payload.- Throws:
Exception
- the exception
-
createSecret
Creates the secret.- Throws:
Exception
- the exception
-
starTest
Test to check star method by verifying stargarzer count.- Throws:
Exception
- the exception
-
testCreateRepoActionVariable
Test create repo action variable.- Throws:
IOException
- the exception
-
testUpdateRepoActionVariable
Test update repo action variable.- Throws:
IOException
- the exception
-
testDeleteRepoActionVariable
Test delete repo action variable.- Throws:
IOException
- the exception
-
cannotRetrievePermissionMaintainUser
Test demoing the issue with a user having the maintain permission on a repository. Test checking the permission fallback mechanism in case the Github API changes. The test was recorded at a time a new permission was added by mistake. If a re-recording it is needed, you'll like have to manually edit the generated mocks to get a non existing permission See https://github.com/hub4j/github-api/issues/1671#issuecomment-1577515662 for the details.- Throws:
IOException
- the exception
-
testSearchPullRequests
Test searching for pull requests.- Throws:
IOException
- the exceptionException
-
testGetTopReferralPaths
Test getTopReferralPaths.- Throws:
Exception
- the exception
-
testGetTopReferralSources
Test getTopReferralSources.- Throws:
Exception
- the exception
-
testGetRulesForBranch
Test getRulesForBranch.- Throws:
Exception
- the exception
-
testIsVulnerabilityAlertsEnabled
Test getVulnerabilityAlerts.- Throws:
Exception
- the exception
-