Skip to content

Commit a29c007

Browse files
committed
Updated with recently added filter attributes.
1 parent f3881bd commit a29c007

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

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

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public class ProjectFilter {
2323
private Boolean withCustomAttributes;
2424
private Boolean withIssuesEnabled;
2525
private Boolean withMergeRequestsEnabled;
26+
private String withProgrammingLanguage;
27+
private Boolean wikiChecksumFailed;
28+
private Boolean repositoryChecksumFailed;
2629
private AccessLevel minAccessLevel;
2730

2831
/**
@@ -161,14 +164,49 @@ public ProjectFilter withIssuesEnabled(Boolean withIssuesEnabled) {
161164
/**
162165
* Limit by enabled merge requests feature
163166
*
164-
* @param withMergeRequestsEnabled if true, imit by enabled merge requests feature
167+
* @param withMergeRequestsEnabled if true, limit by enabled merge requests feature
165168
* @return the reference to this ProjectFilter instance
166169
*/
167170
public ProjectFilter withMergeRequestsEnabled(Boolean withMergeRequestsEnabled) {
168171
this.withMergeRequestsEnabled = withMergeRequestsEnabled;
169172
return (this);
170173
}
171174

175+
/**
176+
* Limit by projects which use the given programming language.
177+
*
178+
* @param withProgrammingLanguage limit by projects which use the given programming language
179+
* @return the reference to this ProjectFilter instance
180+
*/
181+
public ProjectFilter withProgrammingLanguage(String withProgrammingLanguage) {
182+
this.withProgrammingLanguage = withProgrammingLanguage;
183+
return (this);
184+
}
185+
186+
/**
187+
* Limit projects where the wiki checksum calculation has failed.
188+
*
189+
* @since GitLab 11.2
190+
* @param wikiChecksumFailed if true, limit projects where the wiki checksum calculation has failed
191+
* @return the reference to this ProjectFilter instance
192+
*/
193+
public ProjectFilter withWikiChecksumFailed(Boolean wikiChecksumFailed) {
194+
this.wikiChecksumFailed = wikiChecksumFailed;
195+
return (this);
196+
}
197+
198+
/**
199+
* Limit projects where the repository checksum calculation has failed.
200+
*
201+
* @since GitLab 11.2
202+
* @param repositoryChecksumFailed if true, limit projects where the repository checksum calculation has failed
203+
* @return the reference to this ProjectFilter instance
204+
*/
205+
public ProjectFilter withRepositoryChecksumFailed(Boolean repositoryChecksumFailed) {
206+
this.repositoryChecksumFailed = repositoryChecksumFailed;
207+
return (this);
208+
}
209+
172210
/**
173211
* Limit by current user minimal access level
174212
*
@@ -213,6 +251,9 @@ public GitLabApiForm getQueryParams() {
213251
.withParam("with_custom_attributes", withCustomAttributes)
214252
.withParam("with_issues_enabled", withIssuesEnabled)
215253
.withParam("with_merge_requests_enabled ", withMergeRequestsEnabled))
254+
.withParam("with_programming_language", withProgrammingLanguage)
255+
.withParam("wiki_checksum_failed", wikiChecksumFailed)
256+
.withParam("repository_checksum_failed", repositoryChecksumFailed)
216257
.withParam("min_access_level ", (minAccessLevel != null ? minAccessLevel.toValue() : null)
217258
);
218259
}

0 commit comments

Comments
 (0)