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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the collaborators.voidAdds the collaborators repo perm.voidarchive()Archive.voidTest demoing the issue with a user having the maintain permission on a repository.voidCheck stargazers count.voidCheck watchers count.voidCreates the dispatch event with client payload.voidCreates the dispatch event without client payload.voidCreates the secret.voidCreates the signed commit unknown signature type.voidCreates the signed commit verify error.voidGets the branch URL encoded.voidGets the branch non existent but 200 status.voidGets the check runs.voidFilter out the checks from a referencevoidGets the collaborators.voidGets the commits between over 250.voidGets the commits between paged.voidGets the delete branch on merge.voidGets the last commit status.voidGets the permission.voidGets the post commit hooks.voidGets the public key.voidgetRef()Gets the ref.voidgetRefs()Gets the refs.voidGets the refs empty tags.voidGets the refs heads.voidGets the release by tag name does not exist.voidGets the release by tag name exists.voidGets the release does not exist.voidGets the release exists.protected GHRepositoryGets the repository.voidGh repository search builder fork default reset forks search terms.voidGh repository search builder ignores unknown visibility.voidChecks for permission.voidChecks if is disabled.voidChecks if is disabled true.voidLatest repository exist.voidLatest repository not exist.voidList collaborators.voidList collaborators filtered.voidList commit comments no comments.voidList commit comments some comments.voidList commits between.voidList commits between paginated.voidList contributors.voidList contributors.voidList empty contributors.voidList languages.voidlistRefs()List refs.voidList refs empty tags.voidList refs heads.voidList releases.voidList stargazers.voidlistTags()List tags.voidList tags empty.voidmarkDown()Mark down.voidSearch all public and forked repos.voidSearch for public forked only repos.voidSearch org for repositories.voidSearch repositories.voidSets the delete branch on merge.voidSets the merge options.voidstarTest()Test to check star method by verifying stargarzer count.voidSubscription.voidsync()Test sync of forkvoidTest sync of repository not a forkvoidTest create repo action variable.voidTests the creation of repositories with alternating visibilities for orgs.voidTests the creation of repositories with alternating visibilities for users.voidTest delete repo action variable.voidTest get repository with visibility.voidTest getRulesForBranch.voidTest getters.voidTest getTopReferralPaths.voidTest getTopReferralSources.voidTest issue 162.voidTest getVulnerabilityAlerts.voidTest searching for pull requests.voidTest set public.voidTest set topics.voidTest tarball.voidTest update repo action variable.voidTest update repository.voidTest zipball.voidUser 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
-
LatestRepositoryExist
public void LatestRepositoryExist()Latest repository exist. -
LatestRepositoryNotExist
public void LatestRepositoryNotExist()Latest repository not exist. -
addCollaborators
Adds the collaborators.- Throws:
Exception- the exception
-
addCollaboratorsRepoPerm
Adds the collaborators repo perm.- Throws:
Exception- the exception
-
archive
Archive.- Throws:
Exception- 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
-
checkStargazersCount
Check stargazers count.- Throws:
Exception- the exception
-
checkWatchersCount
Check watchers count.- Throws:
Exception- the exception
-
createDispatchEventWithClientPayload
Creates the dispatch event with client payload.- Throws:
Exception- the exception
-
createDispatchEventWithoutClientPayload
Creates the dispatch event without client payload.- Throws:
Exception- the exception
-
createSecret
Creates the secret.- Throws:
Exception- the exception
-
createSignedCommitUnknownSignatureType
Creates the signed commit unknown signature type.- Throws:
IOException- Signals that an I/O exception has occurred.
-
createSignedCommitVerifyError
Creates the signed commit verify error.- Throws:
IOException- Signals that an I/O exception has occurred.
-
getBranchNonExistentBut200Status
Gets the branch non existent but 200 status.- Throws:
Exception- the exception
-
getBranch_URLEncoded
Gets the branch URL encoded.- 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
-
getCollaborators
Gets the collaborators.- 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
-
getDeleteBranchOnMerge
Gets the delete branch on merge.- Throws:
IOException- Signals that an I/O exception has occurred.
-
getLastCommitStatus
Gets the last commit status.- Throws:
Exception- the exception
-
getPermission
Gets the permission.- Throws:
Exception- the exception
-
getPostCommitHooks
Gets the post commit hooks.- Throws:
Exception- the exception
-
getPublicKey
Gets the public key.- Throws:
Exception- the exception
-
getRef
Gets the ref.- Throws:
Exception- the exception
-
getRefs
Gets the refs.- Throws:
Exception- the exception
-
getRefsEmptyTags
Gets the refs empty tags.- Throws:
Exception- the exception
-
getRefsHeads
Gets the refs heads.- Throws:
Exception- the exception
-
getReleaseByTagNameDoesNotExist
Gets the release by tag name 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.
-
getReleaseDoesNotExist
Gets the release does not exist.- 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.
-
ghRepositorySearchBuilderForkDefaultResetForksSearchTerms
public void ghRepositorySearchBuilderForkDefaultResetForksSearchTerms()Gh repository search builder fork default reset forks search terms. -
ghRepositorySearchBuilderIgnoresUnknownVisibility
public void ghRepositorySearchBuilderIgnoresUnknownVisibility()Gh repository search builder ignores unknown visibility. -
hasPermission
Checks for permission.- Throws:
Exception- the exception
-
isDisabled
Checks if is disabled.- Throws:
Exception- the exception
-
isDisabledTrue
Checks if is disabled true.- Throws:
Exception- the exception
-
listCollaborators
List collaborators.- Throws:
Exception- the exception
-
listCollaboratorsFiltered
List collaborators filtered.- Throws:
Exception- the exception
-
listCommitCommentsNoComments
List commit comments no comments.- Throws:
IOException- Signals that an I/O exception has occurred.
-
listCommitCommentsSomeComments
List commit comments some comments.- Throws:
IOException- Signals that an I/O exception has occurred.
-
listCommitsBetween
List commits between.- Throws:
Exception- the exception
-
listCommitsBetweenPaginated
List commits between paginated.- Throws:
Exception- the exception
-
listContributors
List contributors.- Throws:
IOException- Signals that an I/O exception has occurred.
-
listContributorsAnon
List contributors.- Throws:
IOException- Signals that an I/O exception has occurred.
-
listEmptyContributors
List empty contributors.- Throws:
IOException- Signals that an I/O exception has occurred.
-
listLanguages
List languages.- Throws:
IOException- Signals that an I/O exception has occurred.
-
listRefs
List refs.- Throws:
Exception- the exception
-
listRefsEmptyTags
public void listRefsEmptyTags()List refs empty tags. -
listRefsHeads
List refs heads.- Throws:
Exception- the exception
-
listReleases
List releases.- Throws:
IOException- Signals that an I/O exception has occurred.
-
listStargazers
List stargazers.- Throws:
IOException- Signals that an I/O exception has occurred.
-
listTags
List tags.- Throws:
Exception- the exception
-
listTagsEmpty
List tags empty.- Throws:
Exception- the exception
-
markDown
Mark down.- Throws:
Exception- the exception
-
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.
-
searchOrgForRepositories
public void searchOrgForRepositories()Search org for repositories. -
searchRepositories
public void searchRepositories()Search repositories. -
setDeleteBranchOnMerge
Sets the delete branch on merge.- Throws:
IOException- Signals that an I/O exception has occurred.
-
setMergeOptions
Sets the merge options.- Throws:
IOException- Signals that an I/O exception has occurred.
-
starTest
Test to check star method by verifying stargarzer count.- Throws:
Exception- the exception
-
subscription
Subscription.- Throws:
Exception- the exception
-
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.
-
testCreateRepoActionVariable
Test create repo action variable.- Throws:
IOException- 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
-
testDeleteRepoActionVariable
Test delete repo action variable.- Throws:
IOException- the exception
-
testGetRepositoryWithVisibility
Test get repository with visibility.- Throws:
IOException- Signals that an I/O exception has occurred.
-
testGetRulesForBranch
Test getRulesForBranch.- Throws:
Exception- the exception
-
testGetTopReferralPaths
Test getTopReferralPaths.- Throws:
Exception- the exception
-
testGetTopReferralSources
Test getTopReferralSources.- Throws:
Exception- the exception
-
testGetters
Test getters.- Throws:
IOException- Signals that an I/O exception has occurred.
-
testIsVulnerabilityAlertsEnabled
Test getVulnerabilityAlerts.- Throws:
Exception- the exception
-
testIssue162
Test issue 162.- Throws:
Exception- the exception
-
testSearchPullRequests
Test searching for pull requests.- Throws:
Exception- the exception
-
testSetPublic
Test set public.- Throws:
Exception- the exception
-
testSetTopics
Test set topics.- Throws:
Exception- the exception
-
testTarball
Test tarball.- Throws:
IOException- Signals that an I/O exception has occurred.
-
testUpdateRepoActionVariable
Test update repo action variable.- Throws:
IOException- the exception
-
testUpdateRepository
Test update repository.- Throws:
Exception- the exception
-
testZipball
Test zipball.- Throws:
IOException- Signals that an I/O exception has occurred.
-
userIsCollaborator
User is collaborator.- Throws:
Exception- the exception
-
getRepository
Gets the repository.- Returns:
- the repository
- Throws:
IOException- Signals that an I/O exception has occurred.
-