Skip to content

Commit d830e21

Browse files
committed
Removed all deprecated code related to runner scope (#373).
1 parent 330b1ec commit d830e21

File tree

2 files changed

+1
-146
lines changed

2 files changed

+1
-146
lines changed

src/main/java/org/gitlab4j/api/RunnersApi.java

Lines changed: 1 addition & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -139,76 +139,6 @@ public Stream<Runner> getRunnersStream(RunnerType type, RunnerStatus status) thr
139139
return (getRunners(type, status, getDefaultPerPage()).stream());
140140
}
141141

142-
/**
143-
* Get a list of all available runners available to the user with pagination support.
144-
*
145-
* <pre><code>GitLab Endpoint: GET /runners</code></pre>
146-
*
147-
* @param scope The scope of specific runners to show, one of: active, paused, online; showing all runners null
148-
* @return List of Runners
149-
* @throws GitLabApiException if any exception occurs
150-
* @deprecated As of release 4.11.5, replaced by {@link #getRunners(Runner.RunnerType, Runner.RunnerStatus)}
151-
*/
152-
@Deprecated
153-
public List<Runner> getRunners(RunnerStatus scope) throws GitLabApiException {
154-
return (getRunners(scope, getDefaultPerPage()).all());
155-
}
156-
157-
/**
158-
* Get a list of specific runners available to the user.
159-
*
160-
* <pre><code>GitLab Endpoint: GET /runners</code></pre>
161-
*
162-
* @param scope The scope of specific runners to show, one of: active, paused, online; showing all runners null
163-
* @param page The page offset of runners
164-
* @param perPage The number of runners to get after the page offset
165-
* @return List of Runners
166-
* @throws GitLabApiException if any exception occurs
167-
* @deprecated As of release 4.11.5, replaced by {@link #getRunners(Runner.RunnerType, Runner.RunnerStatus, int, int)}
168-
*/
169-
@Deprecated
170-
public List<Runner> getRunners(RunnerStatus scope, int page, int perPage) throws GitLabApiException {
171-
GitLabApiForm formData = new GitLabApiForm()
172-
.withParam("scope", scope, false)
173-
.withParam("page", page, false)
174-
.withParam("per_page", perPage, false);
175-
Response response = get(Response.Status.OK, formData.asMap(), "runners");
176-
return (response.readEntity(new GenericType<List<Runner>>() {
177-
}));
178-
}
179-
180-
/**
181-
* Get a list of specific runners available to the user.
182-
*
183-
* <pre><code>GitLab Endpoint: GET /runners</code></pre>
184-
*
185-
* @param scope the scope of specific runners to show, one of: active, paused, online; showing all runners null
186-
* @param itemsPerPage The number of Runner instances that will be fetched per page
187-
* @return a Pager containing the Runners for the user
188-
* @throws GitLabApiException if any exception occurs
189-
* @deprecated As of release 4.11.5, replaced by {@link #getRunners(Runner.RunnerType, Runner.RunnerStatus, int)}
190-
*/
191-
@Deprecated
192-
public Pager<Runner> getRunners(RunnerStatus scope, int itemsPerPage) throws GitLabApiException {
193-
GitLabApiForm formData = new GitLabApiForm().withParam("scope", scope, false);
194-
return (new Pager<>(this, Runner.class, itemsPerPage, formData.asMap(), "runners"));
195-
}
196-
197-
/**
198-
* Get a Stream of all available runners available to the user with pagination support.
199-
*
200-
* <pre><code>GitLab Endpoint: GET /runners</code></pre>
201-
*
202-
* @param scope The scope of specific runners to show, one of: active, paused, online; showing all runners null
203-
* @return Stream of Runners
204-
* @throws GitLabApiException if any exception occurs
205-
* @deprecated As of release 4.11.5, replaced by {@link #getRunnersStream(Runner.RunnerType, Runner.RunnerStatus)}
206-
*/
207-
@Deprecated
208-
public Stream<Runner> getRunnersStream(RunnerStatus scope) throws GitLabApiException {
209-
return (getRunners(scope, getDefaultPerPage()).stream());
210-
}
211-
212142
/**
213143
* Get a list of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.
214144
*
@@ -232,7 +162,7 @@ public List<Runner> getAllRunners() throws GitLabApiException {
232162
* @throws GitLabApiException if any exception occurs
233163
*/
234164
public List<Runner> getAllRunners(int page, int perPage) throws GitLabApiException {
235-
return (getAllRunners(null, page, perPage));
165+
return (getAllRunners(null, null, page, perPage));
236166
}
237167

238168
/**
@@ -326,72 +256,6 @@ public Stream<Runner> getAllRunnersStream(RunnerType type, RunnerStatus status)
326256
return (getAllRunners(type, status, getDefaultPerPage()).stream());
327257
}
328258

329-
/**
330-
* Get a list of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.
331-
*
332-
* <pre><code>GitLab Endpoint: GET /runners/all</code></pre>
333-
*
334-
* @param scope The scope of specific runners to show, one of: active, paused, online; showing all runners null
335-
* @return a List of Runners
336-
* @throws GitLabApiException if any exception occurs
337-
* @deprecated As of release 4.11.5, replaced by {@link #getAllRunners(Runner.RunnerType, Runner.RunnerStatus)}
338-
*/
339-
@Deprecated
340-
public List<Runner> getAllRunners(RunnerStatus scope) throws GitLabApiException {
341-
return (getAllRunners(scope, getDefaultPerPage()).all());
342-
}
343-
344-
/**
345-
* Get a list of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.
346-
*
347-
* <pre><code>GitLab Endpoint: GET /runners/all</code></pre>
348-
*
349-
* @param scope The scope of specific runners to show, one of: active, paused, online; showing all runners null
350-
* @param page The page offset of runners
351-
* @param perPage The number of runners to get after the page offset
352-
* @return List of Runners
353-
* @throws GitLabApiException if any exception occurs
354-
* @deprecated As of release 4.11.5, replaced by {@link #getAllRunners(Runner.RunnerType, Runner.RunnerStatus, int, int)}
355-
*/
356-
@Deprecated
357-
public List<Runner> getAllRunners(RunnerStatus scope, int page, int perPage) throws GitLabApiException {
358-
GitLabApiForm formData = new GitLabApiForm(page, perPage).withParam("scope", scope, false);
359-
Response response = get(Response.Status.OK, formData.asMap(), "runners", "all");
360-
return (response.readEntity(new GenericType<List<Runner>>() {}));
361-
}
362-
363-
/**
364-
* Get a list of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.
365-
*
366-
* <pre><code>GitLab Endpoint: GET /runners/all</code></pre>
367-
*
368-
* @param scope the scope of specific runners to show, one of: active, paused, online; showing all runners null
369-
* @param itemsPerPage The number of Runner instances that will be fetched per page
370-
* @return a Pager containing the Runners
371-
* @throws GitLabApiException if any exception occurs
372-
* @deprecated As of release 4.11.5, replaced by {@link #getAllRunners(Runner.RunnerType, Runner.RunnerStatus, int)}
373-
*/
374-
@Deprecated
375-
public Pager<Runner> getAllRunners(RunnerStatus scope, int itemsPerPage) throws GitLabApiException {
376-
GitLabApiForm formData = new GitLabApiForm().withParam("scope", scope, false);
377-
return (new Pager<>(this, Runner.class, itemsPerPage, formData.asMap(), "runners", "all"));
378-
}
379-
380-
/**
381-
* Get a Stream of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges.
382-
*
383-
* <pre><code>GitLab Endpoint: GET /runners/all</code></pre>
384-
*
385-
* @param scope The scope of specific runners to show, one of: active, paused, online; showing all runners null
386-
* @return a Stream of Runners
387-
* @throws GitLabApiException if any exception occurs
388-
* @deprecated As of release 4.11.5, replaced by {@link #getAllRunnersStream(Runner.RunnerType, Runner.RunnerStatus)}
389-
*/
390-
@Deprecated
391-
public Stream<Runner> getAllRunnersStream(RunnerStatus scope) throws GitLabApiException {
392-
return (getAllRunners(scope, getDefaultPerPage()).stream());
393-
}
394-
395259
/**
396260
* Get details of a runner.
397261
*
@@ -486,7 +350,6 @@ public Stream<Job> getJobsStream(Integer runnerId) throws GitLabApiException {
486350
return (getJobs(runnerId, null, getDefaultPerPage()).stream());
487351
}
488352

489-
490353
/**
491354
* List jobs that are being processed or were processed by specified Runner.
492355
*

src/main/java/org/gitlab4j/api/models/Runner.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ public class Runner {
2222
*/
2323
public enum RunnerStatus {
2424

25-
/** @deprecated This RunnerStatus value is deprecated and will be removed in a future release. */
26-
@Deprecated
27-
SPECIFIC,
28-
29-
/** @deprecated This RunnerStatus value is deprecated and will be removed in a future release. */
30-
@Deprecated
31-
SHARED,
32-
3325
ACTIVE, ONLINE, PAUSED, OFFLINE;
3426

3527
private static JacksonJsonEnumHelper<RunnerStatus> enumHelper =

0 commit comments

Comments
 (0)