cob: Include head in initial patch entry in DAG

This change ensures that we include as a parent to the initial commit
of a patch COB, the head of the branch we are proposing as a patch.

This was already happening for patch updates, but we forgot to also
include it for the initial patch revision.

This ensures that the code is always fetched alongside the patch.
This commit is contained in:
Alexis Sellier
2023-05-02 09:18:17 +02:00
parent 5971c1c9f9
commit 32fde2aecf
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -1784,7 +1784,7 @@ mod routes {
#[tokio::test]
async fn test_projects_create_patches() {
const CREATED_PATCH_ID: &str = "f69641cba6d7df2c22844d7f39225b5cda54d363";
const CREATED_PATCH_ID: &str = "198b7bc8d19ef2f09e9fbd30645a46e4cd520713";
let tmp = tempfile::tempdir().unwrap();
let ctx = contributor(tmp.path());
@@ -1978,7 +1978,7 @@ mod routes {
"reviews": [],
},
{
"id": "b1a8c5b3e1686891808fcac0d795d0bad1e69709",
"id": "660ce23a54788d85d44a133357b53fc99f5d7a92",
"description": "This is a new revision",
"base": PARENT,
"oid": HEAD,
+3 -3
View File
@@ -37,9 +37,9 @@ pub const CONTRIBUTOR_RID: &str = "rad:z4XaCmN3jLSeiMvW15YTDpNbDHFhG";
pub const CONTRIBUTOR_DID: &str = "did:key:z6Mkk7oqY4pPxhMmGEotDYsFo97vhCj85BLY1H256HrJmjN8";
pub const CONTRIBUTOR_NID: &str = "z6Mkk7oqY4pPxhMmGEotDYsFo97vhCj85BLY1H256HrJmjN8";
pub const CONTRIBUTOR_ISSUE_ID: &str = "f1dff128a22e8183a23516dd9812e72e80914c92";
pub const CONTRIBUTOR_PATCH_ID: &str = "4b7ea91da1f551bc5ea5d2057125d7ba42d451cb";
pub const CONTRIBUTOR_COMMENT_1: &str = "8f6e72c20da0e6ee2af004f059ced23d409a285a";
pub const CONTRIBUTOR_COMMENT_2: &str = "c88ce78b17a705f389e72ec5c80da7360a675e51";
pub const CONTRIBUTOR_PATCH_ID: &str = "dcac7b6a320ce94e9a801ff9d766a04d24f63062";
pub const CONTRIBUTOR_COMMENT_1: &str = "ec1c721cb3f726c3c0455519034c3a8b1a6ebaef";
pub const CONTRIBUTOR_COMMENT_2: &str = "4458381a73ff68063311d440538aff4b48122b9c";
const PASSWORD: &str = "radicle";