Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added version filtering #1139

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/java/org/gitlab4j/api/models/PackageFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class PackageFilter implements Serializable {
private String packageName;
private Boolean includeVersionless;
private PackageStatus status;
private String packageVersion;

/**
* Exclude Subgroups.
Expand Down Expand Up @@ -96,6 +97,15 @@ public PackageFilter withStatus(PackageStatus status) {
return (this);
}

/**
* Filter the returned packages by version.
* @param packageVersion package packageVersion
* @return the reference to this ProjectFilter instance
*/
public PackageFilter withPackageVersion(String packageVersion) {
this.packageVersion = packageVersion;
return (this);
}
/**
* Get the query params specified by this filter.
*
Expand All @@ -110,6 +120,7 @@ public GitLabApiForm getQueryParams() {
.withParam("package_name", packageName)
.withParam("include_versionless", includeVersionless)
.withParam("status", status)
.withParam("package_version", packageVersion)
);
}
}
Loading