Constructor and description |
---|
GitlabRequestUtil
() |
Type Params | Return Type | Name and description |
---|---|---|
|
static java.lang.String |
createGroup(java.lang.String baseUrl, java.lang.String group, java.lang.String token) Calls the makeRequest method with parameters which adjust the HTTP request as to create a GitLab group (namespace for a collection of repositories) |
|
static java.lang.String |
createRepositoryInGroup(java.lang.String baseUrl, java.lang.String repositoryName, int groupNamespaceId, java.lang.String token) Calls the makeRequest method with parameters which adjust the HTTP request as to create a repository within a GitLab Group (namespace) |
|
static java.lang.String |
deleteRepoById(java.lang.String baseUrl, int repoId, java.lang.String token) Calls the makeRequest method with parameters which adjust the HTTP request as to delete a repository with a given id |
|
static java.util.List |
getAllRepositoriesInGroup(java.lang.String baseUrl, java.lang.String groupName, java.lang.String token) Calls the makeRequest method with parameters which adjust the HTTP request as to return all the repositories that exist within a given group (namespace) |
|
static java.util.List |
getGroupInfo(java.lang.String baseUrl, java.lang.String groupName, java.lang.String token) Calls the makeRequest method with parameters which adjust the HTTP request as to get all the information about a given group. |
|
static boolean |
groupExists(java.lang.String baseUrl, java.lang.String groupName, java.lang.String token) Calls the makeRequest method with parameters which adjust the HTTP request as to check if a group already exists |
|
static java.lang.String |
makeRequest(java.lang.String endpoint, java.lang.String method, java.lang.String token) Performs an HTTP request with a Private-Token header and returns the response if the request returned a 2.x.x response code and throws an exception otherwise |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Calls the makeRequest method with parameters which adjust the HTTP request as to create a GitLab group (namespace for a collection of repositories)
baseUrl
- Gitlab base url e.g http://gitlab/gitlab or http://group
- The group (namespace)token
- The GitLab access token which allows API accessCalls the makeRequest method with parameters which adjust the HTTP request as to create a repository within a GitLab Group (namespace)
baseUrl
- Gitlab base url e.g http://gitlab/gitlab or http://repositoryName
- The name of the repository to be createdgroupNamespaceId
- The id of the group namespace e.g 60token
- The GitLab access token which allows API accessCalls the makeRequest method with parameters which adjust the HTTP request as to delete a repository with a given id
baseUrl
- Gitlab base url e.g http://gitlab/gitlab or http://repoId
- The id of the repository to be deletedtoken
- The GitLab access token which allows API accessCalls the makeRequest method with parameters which adjust the HTTP request as to return all the repositories that exist within a given group (namespace)
baseUrl
- Gitlab base url e.g http://gitlab/gitlab or http://group
- The group (namespace)token
- The GitLab access token which allows API accessCalls the makeRequest method with parameters which adjust the HTTP request as to get all the information about a given group.
baseUrl
- Gitlab base url e.g http://gitlab/gitlab or http://group
- The group (namespace) to search fortoken
- The GitLab access token which allows API accessCalls the makeRequest method with parameters which adjust the HTTP request as to check if a group already exists
baseUrl
- Gitlab base url e.g http://gitlab/gitlab or http://group
- The group (namespace) to search fortoken
- The GitLab access token which allows API accessPerforms an HTTP request with a Private-Token header and returns the response if the request returned a 2.x.x response code and throws an exception otherwise
endpoint
- e.g http://10.161.85.37/gitlab/api/v4/projects/method
- HTTP method e.g GET,POST, PUTtoken
- The GitLab access token which allows API access