Class GiteaApiClient
Object
GiteaApiClient
REST client for the Gitea API.
Uses a dedicated
RestTemplate (not the vitruvioRestTemplate) with
Authorization: token header for Gitea authentication.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classException thrown when a Gitea API call fails. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCommitStatus(String baseUrl, String token, String repoFullName, String sha) Returns the combined commit status for a given SHA.listBranches(String baseUrl, String token, String repoFullName) Lists branches for a specific repository.listDeployTeamRepos(String baseUrl, String token) Lists repositories that belong to the "deploy" team of the "davinti" org.Lists all repositories accessible to the authenticated user.testConnection(String baseUrl, String token) Tests connectivity by calling the authenticated user endpoint.
-
Constructor Details
-
GiteaApiClient
public GiteaApiClient()
-
-
Method Details
-
testConnection
Tests connectivity by calling the authenticated user endpoint.- Returns:
- the authenticated username
- Throws:
GiteaApiClient.GiteaApiException- if the connection or authentication fails
-
listRepos
Lists all repositories accessible to the authenticated user. Paginates through all pages automatically. -
listBranches
Lists branches for a specific repository. -
listDeployTeamRepos
Lists repositories that belong to the "deploy" team of the "davinti" org. Only repos owned by "davinti" are returned. -
getCommitStatus
Returns the combined commit status for a given SHA. Gitea returns: "success", "pending", "failure", "error", or "warning".- Returns:
- the combined state string, or
nullif no statuses exist
-