Skip to content

Commit 774772d

Browse files
author
Valentin Manea
committed
added version filtering
1 parent 91807f2 commit 774772d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public class PackageFilter implements Serializable {
2020
private String packageName;
2121
private Boolean includeVersionless;
2222
private PackageStatus status;
23+
private String packageVersion;
2324

2425
/**
2526
* Exclude Subgroups.
@@ -96,6 +97,15 @@ public PackageFilter withStatus(PackageStatus status) {
9697
return (this);
9798
}
9899

100+
/**
101+
* Filter the returned packages by status.
102+
* @param packageVersion package packageVersion
103+
* @return the reference to this ProjectFilter instance
104+
*/
105+
public PackageFilter withPackageVersion(String packageVersion) {
106+
this.packageVersion = packageVersion;
107+
return (this);
108+
}
99109
/**
100110
* Get the query params specified by this filter.
101111
*
@@ -110,6 +120,7 @@ public GitLabApiForm getQueryParams() {
110120
.withParam("package_name", packageName)
111121
.withParam("include_versionless", includeVersionless)
112122
.withParam("status", status)
123+
.withParam("package_version", packageVersion)
113124
);
114125
}
115126
}

0 commit comments

Comments
 (0)