Commit f7ca6115 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

api/merge_requests: support triggering merge status rechecks

parent 48198d94
......@@ -58,6 +58,7 @@
* Merge request discussions can now be created on a specific commit.
* Merge requests can now be edited with incremental label changes.
* Merge requests can now be filtered by search scopes.
* Merge requests can now trigger merge status rechecks when listing.
# v0.1308.0
......
......@@ -244,6 +244,9 @@ pub struct MergeRequests<'a> {
/// Include label details in the result.
#[builder(default)]
with_labels_details: Option<bool>,
/// Request that the merge status field be updated.
#[builder(default)]
with_merge_status_recheck: Option<bool>,
/// Filter merge requests created after a point in time.
#[builder(default)]
created_after: Option<DateTime<Utc>>,
......@@ -537,6 +540,7 @@ impl<'a> Endpoint for MergeRequests<'a> {
.push_opt("view", self.view)
.push_opt("labels", self.labels.as_ref())
.push_opt("with_labels_details", self.with_labels_details)
.push_opt("with_merge_status_recheck", self.with_merge_status_recheck)
.push_opt("created_after", self.created_after)
.push_opt("created_before", self.created_before)
.push_opt("updated_after", self.updated_after)
......@@ -843,6 +847,23 @@ mod tests {
api::ignore(endpoint).query(&client).unwrap();
}
#[test]
fn endpoint_with_merge_status_recheck() {
let endpoint = ExpectedUrl::builder()
.endpoint("projects/simple%2Fproject/merge_requests")
.add_query_params(&[("with_merge_status_recheck", "true")])
.build()
.unwrap();
let client = SingleTestClient::new_raw(endpoint, "");
let endpoint = MergeRequests::builder()
.project("simple/project")
.with_merge_status_recheck(true)
.build()
.unwrap();
api::ignore(endpoint).query(&client).unwrap();
}
#[test]
fn endpoint_created_after() {
let endpoint = ExpectedUrl::builder()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment