Skip to content

Commit

Permalink
Add packageVersion filter (#1139)
Browse files Browse the repository at this point in the history
Co-authored-by: Valentin Manea <[email protected]>
  • Loading branch information
valentinmanea and Valentin Manea committed Aug 7, 2024
1 parent 9378b78 commit bff0b31
Showing 1 changed file with 11 additions and 0 deletions.
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)
);
}
}

0 comments on commit bff0b31

Please sign in to comment.