mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
cob: mandatory Oid in CodeLocation
To make `CodeLocation` reusable across different components, require that a commit's `Oid` is part of the struct. An `Oid` is necessary since the `path` can refer to a path at any point in time throughout the history of the repository. By pinning the commit that is being referred to, the path will refer to the path within the associated tree [of the commit]. Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett
This commit is contained in:
committed by
cloudhead
parent
1a63024a58
commit
2cbfb6dd53
@@ -4,7 +4,7 @@ use std::path::Path;
|
||||
use std::str;
|
||||
|
||||
use base64::prelude::{Engine, BASE64_STANDARD};
|
||||
use radicle::patch::CodeLocation;
|
||||
use radicle::cob::CodeLocation;
|
||||
use serde_json::{json, Value};
|
||||
|
||||
use radicle::cob::issue::{Issue, IssueId};
|
||||
|
||||
@@ -3111,6 +3111,7 @@ mod routes {
|
||||
}
|
||||
],
|
||||
"location": {
|
||||
"commit": HEAD,
|
||||
"path": "README.md",
|
||||
"new": {
|
||||
"type": "lines",
|
||||
@@ -3224,7 +3225,7 @@ mod routes {
|
||||
"summary": "A small review",
|
||||
"comments": [
|
||||
{
|
||||
"id": "b108acfd2117480fd87012a5ab7cb69a0651d933",
|
||||
"id": "2ed1c517997d3f1a83c6830ebab069c6e2ee967e",
|
||||
"author": {
|
||||
"id": "did:key:z6Mkk7oqY4pPxhMmGEotDYsFo97vhCj85BLY1H256HrJmjN8",
|
||||
},
|
||||
@@ -3272,6 +3273,7 @@ mod routes {
|
||||
"timestamp": 1671125284,
|
||||
"replyTo": null,
|
||||
"location": {
|
||||
"commit": HEAD,
|
||||
"path": "README.md",
|
||||
"old": null,
|
||||
"new": {
|
||||
|
||||
Reference in New Issue
Block a user