Interface GiteaConnection
- All Superinterfaces:
AutoCloseable
The Gitea Client connection, use
Gitea to open a connection. Example:
try (GiteaConnection c = Gitea.server(...).as(...).open()) {
// use the connection
}
-
Method Summary
Modifier and TypeMethodDescriptionbooleancheckCollaborator(String username, String name, String collaboratorName) booleancheckCollaborator(GiteaRepository repository, String collaboratorName) booleancheckFile(GiteaRepository repository, String ref, String path) voidclose()createCommitStatus(String username, String repository, String sha, GiteaCommitStatus status) createCommitStatus(GiteaRepository repository, String sha, GiteaCommitStatus status) createHook(GiteaOrganization organization, GiteaHook hook) createHook(GiteaRepository repository, GiteaHook hook) createReleaseAttachment(String username, String repository, long id, String name, InputStream file) createReleaseAttachment(GiteaRepository repository, long id, String name, InputStream file) voiddeleteHook(GiteaOrganization organization, long id) voiddeleteHook(GiteaOrganization organization, GiteaHook hook) voiddeleteHook(GiteaRepository repository, long id) voiddeleteHook(GiteaRepository repository, GiteaHook hook) fetchAnnotatedTag(String username, String repository, String sha1) fetchAnnotatedTag(GiteaRepository repository, GiteaTag tag) fetchBranch(String username, String repository, String name) fetchBranch(GiteaRepository repository, String name) fetchBranches(String username, String name) fetchBranches(GiteaRepository repository) fetchCollaborators(String username, String name) fetchCollaborators(GiteaRepository repository) fetchCommit(String username, String repository, String sha1) fetchCommit(GiteaRepository repository, String sha1) fetchCommitStatuses(GiteaRepository repository, String sha) byte[]fetchFile(GiteaRepository repository, String ref, String path) fetchHooks(String organizationName) fetchHooks(String username, String name) fetchHooks(GiteaOrganization organization) fetchHooks(GiteaRepository repository) fetchIssues(String username, String name) fetchIssues(String username, String name, Set<GiteaIssueState> states) fetchIssues(GiteaRepository repository) fetchIssues(GiteaRepository repository, Set<GiteaIssueState> states) fetchOrganization(String name) fetchOwner(String name) fetchPullRequest(String username, String name, long id) fetchPullRequest(GiteaRepository repository, long id) fetchPullRequests(String username, String name) fetchPullRequests(String username, String name, Set<GiteaIssueState> states) fetchPullRequests(GiteaRepository repository) fetchPullRequests(GiteaRepository repository, Set<GiteaIssueState> states) fetchReleases(String username, String name, boolean draft, boolean prerelease) fetchReleases(GiteaRepository repository, boolean draft, boolean prerelease) fetchRepositories(String username) fetchRepositories(GiteaOwner owner) fetchRepository(String username, String name) fetchRepository(GiteaOwner owner, String name) fetchTag(GiteaRepository repository, String tag) fetchTags(GiteaRepository repository) voidupdateHook(GiteaOrganization organization, GiteaHook hook) voidupdateHook(GiteaRepository repository, GiteaHook hook)
-
Method Details
-
fetchVersion
- Throws:
IOExceptionInterruptedException
-
fetchCurrentUser
- Throws:
IOExceptionInterruptedException
-
fetchOwner
- Throws:
IOExceptionInterruptedException
-
fetchUser
- Throws:
IOExceptionInterruptedException
-
fetchOrganization
- Throws:
IOExceptionInterruptedException
-
fetchRepository
GiteaRepository fetchRepository(String username, String name) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchRepository
GiteaRepository fetchRepository(GiteaOwner owner, String name) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchCurrentUserRepositories
- Throws:
IOExceptionInterruptedException
-
fetchRepositories
- Throws:
IOExceptionInterruptedException
-
fetchRepositories
- Throws:
IOExceptionInterruptedException
-
fetchOrganizationRepositories
List<GiteaRepository> fetchOrganizationRepositories(GiteaOwner owner) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchBranch
GiteaBranch fetchBranch(String username, String repository, String name) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchBranch
GiteaBranch fetchBranch(GiteaRepository repository, String name) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchBranches
List<GiteaBranch> fetchBranches(String username, String name) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchBranches
List<GiteaBranch> fetchBranches(GiteaRepository repository) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchAnnotatedTag
GiteaAnnotatedTag fetchAnnotatedTag(String username, String repository, String sha1) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchAnnotatedTag
GiteaAnnotatedTag fetchAnnotatedTag(GiteaRepository repository, GiteaTag tag) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchTag
GiteaTag fetchTag(String username, String repository, String tag) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchTag
- Throws:
IOExceptionInterruptedException
-
fetchTags
- Throws:
IOExceptionInterruptedException
-
fetchTags
- Throws:
IOExceptionInterruptedException
-
fetchCommit
GiteaCommitDetail fetchCommit(String username, String repository, String sha1) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchCommit
GiteaCommitDetail fetchCommit(GiteaRepository repository, String sha1) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchCollaborators
List<GiteaUser> fetchCollaborators(String username, String name) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchCollaborators
List<GiteaUser> fetchCollaborators(GiteaRepository repository) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
checkCollaborator
boolean checkCollaborator(String username, String name, String collaboratorName) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
checkCollaborator
boolean checkCollaborator(GiteaRepository repository, String collaboratorName) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchHooks
- Throws:
IOExceptionInterruptedException
-
fetchHooks
- Throws:
IOExceptionInterruptedException
-
createHook
GiteaHook createHook(GiteaOrganization organization, GiteaHook hook) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
deleteHook
void deleteHook(GiteaOrganization organization, GiteaHook hook) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
deleteHook
- Throws:
IOExceptionInterruptedException
-
updateHook
void updateHook(GiteaOrganization organization, GiteaHook hook) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchHooks
- Throws:
IOExceptionInterruptedException
-
fetchHooks
- Throws:
IOExceptionInterruptedException
-
createHook
GiteaHook createHook(GiteaRepository repository, GiteaHook hook) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
deleteHook
void deleteHook(GiteaRepository repository, GiteaHook hook) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
deleteHook
- Throws:
IOExceptionInterruptedException
-
updateHook
void updateHook(GiteaRepository repository, GiteaHook hook) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchCommitStatuses
List<GiteaCommitStatus> fetchCommitStatuses(GiteaRepository repository, String sha) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
createCommitStatus
GiteaCommitStatus createCommitStatus(String username, String repository, String sha, GiteaCommitStatus status) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
createCommitStatus
GiteaCommitStatus createCommitStatus(GiteaRepository repository, String sha, GiteaCommitStatus status) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchPullRequest
GiteaPullRequest fetchPullRequest(String username, String name, long id) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchPullRequest
GiteaPullRequest fetchPullRequest(GiteaRepository repository, long id) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchPullRequests
List<GiteaPullRequest> fetchPullRequests(String username, String name) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchPullRequests
List<GiteaPullRequest> fetchPullRequests(GiteaRepository repository) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchPullRequests
List<GiteaPullRequest> fetchPullRequests(String username, String name, Set<GiteaIssueState> states) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchPullRequests
List<GiteaPullRequest> fetchPullRequests(GiteaRepository repository, Set<GiteaIssueState> states) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchIssues
- Throws:
IOExceptionInterruptedException
-
fetchIssues
- Throws:
IOExceptionInterruptedException
-
fetchIssues
List<GiteaIssue> fetchIssues(String username, String name, Set<GiteaIssueState> states) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchIssues
List<GiteaIssue> fetchIssues(GiteaRepository repository, Set<GiteaIssueState> states) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchFile
byte[] fetchFile(GiteaRepository repository, String ref, String path) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
checkFile
boolean checkFile(GiteaRepository repository, String ref, String path) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchReleases
List<GiteaRelease> fetchReleases(String username, String name, boolean draft, boolean prerelease) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
fetchReleases
List<GiteaRelease> fetchReleases(GiteaRepository repository, boolean draft, boolean prerelease) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
createReleaseAttachment
GiteaRelease.Attachment createReleaseAttachment(String username, String repository, long id, String name, InputStream file) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
createReleaseAttachment
GiteaRelease.Attachment createReleaseAttachment(GiteaRepository repository, long id, String name, InputStream file) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-