diff --git a/bobbin/crates/types/src/edges.rs b/bobbin/crates/types/src/edges.rs index 8a9037435..f6f4c19c6 100644 --- a/bobbin/crates/types/src/edges.rs +++ b/bobbin/crates/types/src/edges.rs @@ -16,7 +16,7 @@ use crate::org_tangled::graph::follow::Follow; use crate::org_tangled::graph::vouch::Vouch; use crate::org_tangled::key::ssh_key::SshKey; use crate::org_tangled::repo::declaration::Declaration; -use crate::org_tangled::repo::manifest::{Manifest, ManifestUpstream}; +use crate::org_tangled::repo::manifest::{Manifest, ManifestSource}; use crate::sh_tangled::feed::comment::Comment as FeedCommentRecord; use crate::sh_tangled::feed::reaction::Reaction; use crate::sh_tangled::label::definition::Definition as LabelDefinitionRecord; @@ -219,7 +219,7 @@ fn repo_edges(source: &AtUri, record: &Manifest) -> Vec< SubjectRef::Did(record.declaration.owner.clone()), source, ); - if let Some(ManifestUpstream::SourceTangled(upstream)) = &record.upstream { + if let Some(ManifestSource::SourceTangled(upstream)) = &record.source { edges.push(Edge { kind: nsid_static(REPO_SOURCE_EDGE_KIND), subject: SubjectRef::Did(upstream.did.clone()), diff --git a/bobbin/crates/xrpc/src/feed.rs b/bobbin/crates/xrpc/src/feed.rs index 1df046da0..46630f53f 100644 --- a/bobbin/crates/xrpc/src/feed.rs +++ b/bobbin/crates/xrpc/src/feed.rs @@ -11,7 +11,7 @@ use bobbin_edge_index::{ use bobbin_types::ids::{EdgeKey, SubjectRef, nsid_static, owner_did_from_aturi}; use bobbin_types::org_tangled::feed::star::{Star, StarRecord, StarSubject}; use bobbin_types::org_tangled::graph::follow::{Follow, FollowRecord}; -use bobbin_types::org_tangled::repo::manifest::{Manifest, ManifestRecord, ManifestUpstream}; +use bobbin_types::org_tangled::repo::manifest::{Manifest, ManifestRecord, ManifestSource}; use bobbin_types::sh_tangled::actor::{ProfileViewBasic, ProfileViewDetailed, ViewerState}; use bobbin_types::sh_tangled::embed::commit::View as CommitEmbedView; use bobbin_types::sh_tangled::feed::CommentView; @@ -258,8 +258,8 @@ async fn hydrate_repo_event( let repo_did = owner_did_from_aturi(uri) .ok_or_else(|| XrpcError::InvalidParams("repo uri authority must be a did".into()))?; let view = build_repo_view_basic_from_record(state, viewer, &repo, repo_did).await?; - let source = match &repo.upstream { - Some(ManifestUpstream::SourceTangled(upstream)) => { + let source = match &repo.source { + Some(ManifestSource::SourceTangled(upstream)) => { build_repo_view_basic(state, viewer, &upstream.did) .await .ok() diff --git a/bobbin/crates/xrpc/src/profile_activity.rs b/bobbin/crates/xrpc/src/profile_activity.rs index 45e68f7b2..a917d60cf 100644 --- a/bobbin/crates/xrpc/src/profile_activity.rs +++ b/bobbin/crates/xrpc/src/profile_activity.rs @@ -183,7 +183,7 @@ async fn hydrate_activity( Some(ManifestRecord::NSID) => { let (_, record) = fetch::>(state, &uri).await?; - let kind = if record.upstream.is_some() { + let kind = if record.source.is_some() { RepoActivityKind::Forked } else { RepoActivityKind::Created diff --git a/lexicons/org/tangled/repo/manifest.json b/lexicons/org/tangled/repo/manifest.json index 4ceb81e16..5b9c09396 100644 --- a/lexicons/org/tangled/repo/manifest.json +++ b/lexicons/org/tangled/repo/manifest.json @@ -40,7 +40,7 @@ }, "maxLength": 50 }, - "upstream": { + "source": { "type": "union", "description": "source of the repo", "refs": [ diff --git a/localinfra/fixtures/records/did:plc:i3cuazypmjja73m3ahwrsh2z/org.tangled.repo.manifest/self/bafyreic5idoqwbcnjgn7ulfpb4mgho3n2u5jor2lxpsouxtyyrtpaucn2e.json b/localinfra/fixtures/records/did:plc:i3cuazypmjja73m3ahwrsh2z/org.tangled.repo.manifest/self/bafyreie6djkwfaeyrpulc373tkf4hoimhfc5t2jdrmsgqkblalrcl52y7a.json similarity index 81% rename from localinfra/fixtures/records/did:plc:i3cuazypmjja73m3ahwrsh2z/org.tangled.repo.manifest/self/bafyreic5idoqwbcnjgn7ulfpb4mgho3n2u5jor2lxpsouxtyyrtpaucn2e.json rename to localinfra/fixtures/records/did:plc:i3cuazypmjja73m3ahwrsh2z/org.tangled.repo.manifest/self/bafyreie6djkwfaeyrpulc373tkf4hoimhfc5t2jdrmsgqkblalrcl52y7a.json index 11feff918..c589ba87d 100644 --- a/localinfra/fixtures/records/did:plc:i3cuazypmjja73m3ahwrsh2z/org.tangled.repo.manifest/self/bafyreic5idoqwbcnjgn7ulfpb4mgho3n2u5jor2lxpsouxtyyrtpaucn2e.json +++ b/localinfra/fixtures/records/did:plc:i3cuazypmjja73m3ahwrsh2z/org.tangled.repo.manifest/self/bafyreie6djkwfaeyrpulc373tkf4hoimhfc5t2jdrmsgqkblalrcl52y7a.json @@ -5,9 +5,9 @@ "owner": "did:plc:igzuueb63dytyy3tpaweofuu", "slug": "core" }, - "spindle": "did:web:spindle.tngl.boltless.dev", - "upstream": { + "source": { "$type": "org.tangled.repo.defs#sourceExternal", "uri": "https://knot1.tangled.sh/did:plc:ioighzh4jnrhybayw65gfbia" - } + }, + "spindle": "did:web:spindle.tngl.boltless.dev" } diff --git a/localinfra/fixtures/records/did:plc:qbqdycrgcna6n7w5lskwod6y/org.tangled.repo.manifest/self/bafyreifybjiuepxhx3duxnhxowl5ubhrazfvltaqplnjuz643jmuotkhqu.json b/localinfra/fixtures/records/did:plc:qbqdycrgcna6n7w5lskwod6y/org.tangled.repo.manifest/self/bafyreic6d75ygy5fdaoonunl4v5ki6nyazawttswpas3giafc7dgd7uuza.json similarity index 80% rename from localinfra/fixtures/records/did:plc:qbqdycrgcna6n7w5lskwod6y/org.tangled.repo.manifest/self/bafyreifybjiuepxhx3duxnhxowl5ubhrazfvltaqplnjuz643jmuotkhqu.json rename to localinfra/fixtures/records/did:plc:qbqdycrgcna6n7w5lskwod6y/org.tangled.repo.manifest/self/bafyreic6d75ygy5fdaoonunl4v5ki6nyazawttswpas3giafc7dgd7uuza.json index 349511750..43135c753 100644 --- a/localinfra/fixtures/records/did:plc:qbqdycrgcna6n7w5lskwod6y/org.tangled.repo.manifest/self/bafyreifybjiuepxhx3duxnhxowl5ubhrazfvltaqplnjuz643jmuotkhqu.json +++ b/localinfra/fixtures/records/did:plc:qbqdycrgcna6n7w5lskwod6y/org.tangled.repo.manifest/self/bafyreic6d75ygy5fdaoonunl4v5ki6nyazawttswpas3giafc7dgd7uuza.json @@ -5,9 +5,9 @@ "owner": "did:plc:xbserj4jfuhzkbl3mszkvvrb", "slug": "core-fork" }, - "spindle": "did:web:spindle.tngl.boltless.dev", - "upstream": { + "source": { "$type": "org.tangled.repo.defs#sourceTangled", "did": "did:plc:i3cuazypmjja73m3ahwrsh2z" - } + }, + "spindle": "did:web:spindle.tngl.boltless.dev" } diff --git a/localinfra/scripts/init-data.sh b/localinfra/scripts/init-data.sh index ffa7ae14b..d1a73a8e2 100644 --- a/localinfra/scripts/init-data.sh +++ b/localinfra/scripts/init-data.sh @@ -279,8 +279,8 @@ seed account bob-empty-repo did:plc:77uzwanh7ixsvttf6cvkoszj >/dev/null # --- org.tangled repo fixtures --- -put_record at://did:plc:i3cuazypmjja73m3ahwrsh2z/org.tangled.repo.manifest/self bafyreic5idoqwbcnjgn7ulfpb4mgho3n2u5jor2lxpsouxtyyrtpaucn2e -put_record at://did:plc:qbqdycrgcna6n7w5lskwod6y/org.tangled.repo.manifest/self bafyreifybjiuepxhx3duxnhxowl5ubhrazfvltaqplnjuz643jmuotkhqu +put_record at://did:plc:i3cuazypmjja73m3ahwrsh2z/org.tangled.repo.manifest/self bafyreie6djkwfaeyrpulc373tkf4hoimhfc5t2jdrmsgqkblalrcl52y7a +put_record at://did:plc:qbqdycrgcna6n7w5lskwod6y/org.tangled.repo.manifest/self bafyreic6d75ygy5fdaoonunl4v5ki6nyazawttswpas3giafc7dgd7uuza put_record at://did:plc:77uzwanh7ixsvttf6cvkoszj/org.tangled.repo.manifest/self bafyreid3zlshhjzryrysr3egr3yutd26fsmq2kfdaibiccx7sq57qwvuty put_record at://did:plc:i3cuazypmjja73m3ahwrsh2z/org.tangled.label.definition/wontfix bafyreihhxjm2coiw242usm6hnid3i7ius6kdkkyph7afjc7jjp2fb7bz6e put_record at://did:plc:i3cuazypmjja73m3ahwrsh2z/org.tangled.label.definition/good-first-issue bafyreiguf6otpa3jlctujcnvfhqt6thqx76ol5sqmanzhkiru24kdgple4