From 48105b8b359b66e2daa53bba2e98adaf7ee446f1 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Mon, 3 Apr 2023 13:33:43 +0200 Subject: [PATCH] Set patch status to `merged` automatically When a merge is applied to a patch, we check whether the threshold of delegates has been reached, at which point we set the patch status to `merged`. This requires threading the identity document oid through the "apply" process. --- radicle-httpd/src/api/v1/delegates.rs | 1 + radicle-httpd/src/api/v1/projects.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/radicle-httpd/src/api/v1/delegates.rs b/radicle-httpd/src/api/v1/delegates.rs index 589cbd512..603eb287d 100644 --- a/radicle-httpd/src/api/v1/delegates.rs +++ b/radicle-httpd/src/api/v1/delegates.rs @@ -101,6 +101,7 @@ mod routes { "open": 1, "draft": 0, "archived": 0, + "merged": 0, }, "issues": { "open": 1, diff --git a/radicle-httpd/src/api/v1/projects.rs b/radicle-httpd/src/api/v1/projects.rs index ea8969ebc..5d8903fe4 100644 --- a/radicle-httpd/src/api/v1/projects.rs +++ b/radicle-httpd/src/api/v1/projects.rs @@ -751,6 +751,7 @@ mod routes { "open": 1, "draft": 0, "archived": 0, + "merged": 0, }, "issues": { "open": 1, @@ -781,6 +782,7 @@ mod routes { "open": 1, "draft": 0, "archived": 0, + "merged": 0, }, "issues": { "open": 1, @@ -2267,7 +2269,7 @@ mod routes { }, "title": "A new `hello world`", "description": "change `hello world` in README to something else", - "state": { "status": "open" }, + "state": { "status": "merged" }, "target": "delegates", "tags": [], "revisions": [