mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 14:20:42 +08:00
desktop: Name the refs behind local announcements
The node announces the user's own writes, and those of the `rad` CLI, without saying which refs changed, so each one refetched the whole repo, including a scan of every CI job. Comparing the announced signed refs with the previous ones names them. Releases and boards get keys of their own instead of falling back to the whole repo.
This commit is contained in:
@@ -45,6 +45,18 @@ describe("affectedKeys", () => {
|
||||
).toEqual([keys.jobs(rid)]);
|
||||
});
|
||||
|
||||
test("releases and boards affect only their own keys", () => {
|
||||
expect(
|
||||
affectedKeys({
|
||||
rid,
|
||||
refs: [
|
||||
`refs/namespaces/${nid}/refs/cobs/dev.radicle.artifact/${issue}`,
|
||||
`refs/namespaces/${nid}/refs/cobs/works.monadic.board/${issue}`,
|
||||
],
|
||||
}),
|
||||
).toEqual([keys.releases(rid), keys.boards(rid)]);
|
||||
});
|
||||
|
||||
test("an identity update affects the whole repository", () => {
|
||||
expect(
|
||||
affectedKeys({
|
||||
|
||||
Reference in New Issue
Block a user