Skip to content

Commit bff0b31

Browse files
valentinmaneaValentin Manea
and
Valentin Manea
authored
Add packageVersion filter (#1139)
Co-authored-by: Valentin Manea <[email protected]>
1 parent 9378b78 commit bff0b31

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

+11
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 version.
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)