rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood4df058950d96ae133b294ceb757a42b5f98bba7b
{
"request": "trigger",
"version": 1,
"event_type": "patch",
"repository": {
"id": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
"name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack",
"private": false,
"default_branch": "master",
"delegates": [
"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Created",
"patch": {
"id": "09696eea7cc1c64a96b43203c92d61e7f7481f5d",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"title": "cli: fix rad inbox clear output",
"state": {
"status": "merged",
"conflicts": []
},
"before": "bd8e0ebcda8f6f06dc20641a71614e3778a43fea",
"after": "4df058950d96ae133b294ceb757a42b5f98bba7b",
"commits": [
"4df058950d96ae133b294ceb757a42b5f98bba7b"
],
"target": "919d5c780c4da0b5b9f18f1549bc59dffd7125af",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "09696eea7cc1c64a96b43203c92d61e7f7481f5d",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"description": "If multiple ids are specified for `rad inbox clear`, it would report\nthat only 1 item was cleared, when in fact multiple were.\n\nThis was found to be due to the SQL code returning a change count of\n`1`. This is likely due to the way the statement is being reset each\ntime. The `sqlite` library does not seem to easily support the usage\nof `IN` in a `WHERE` clause. So instead, the `count` is aggregated in\nthe loop and returned instead.",
"base": "bd8e0ebcda8f6f06dc20641a71614e3778a43fea",
"oid": "4df058950d96ae133b294ceb757a42b5f98bba7b",
"timestamp": 1712656356
},
{
"id": "386d83572a5334f809c5562581d0671161521193",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": null
},
"description": "Rebase.",
"base": "8bf871903a79c3492ccdece14b8957eeecbe4650",
"oid": "35567583869c2c24a2e040a0f1e755d4e3d17880",
"timestamp": 1712671790
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "f2d1cac9-d02e-44aa-8d33-634fd0fc4eb1"
},
"info_url": "https://cci.rad.levitte.org//f2d1cac9-d02e-44aa-8d33-634fd0fc4eb1.html"
}
Started at: 2026-09-07 18:43:09.710319+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz added
✓ Remote-tracking branch lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz/master created for z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz
✓ Repository successfully cloned under /opt/radcis/ci.rad.levitte.org/cci/state/f2d1cac9-d02e-44aa-8d33-634fd0fc4eb1/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 189 issues · 37 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout 09696eea7cc1c64a96b43203c92d61e7f7481f5d
✓ Switched to branch patch/09696ee at revision 09696ee
✓ Branch patch/09696ee setup to track rad/patches/09696eea7cc1c64a96b43203c92d61e7f7481f5d
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 4df058950d96ae133b294ceb757a42b5f98bba7b
HEAD is now at 4df05895 cli: fix rad inbox clear output
Exit code: 0
$ rad patch show 09696eea7cc1c64a96b43203c92d61e7f7481f5d -p
╭────────────────────────────────────────────────────────────────────────────────╮
│ Title cli: fix rad inbox clear output │
│ Patch 09696eea7cc1c64a96b43203c92d61e7f7481f5d │
│ Author fintohaps z6Mkire…SQZ3voM │
│ Head 4df058950d96ae133b294ceb757a42b5f98bba7b │
│ Base bd8e0ebcda8f6f06dc20641a71614e3778a43fea │
│ Target master │
│ Branches patch/09696ee │
│ Commits ahead 1, behind 1446 │
│ Status merged │
│ │
│ If multiple ids are specified for `rad inbox clear`, it would report │
│ that only 1 item was cleared, when in fact multiple were. │
│ │
│ This was found to be due to the SQL code returning a change count of │
│ `1`. This is likely due to the way the statement is being reset each │
│ time. The `sqlite` library does not seem to easily support the usage │
│ of `IN` in a `WHERE` clause. So instead, the `count` is aggregated in │
│ the loop and returned instead. │
├────────────────────────────────────────────────────────────────────────────────┤
│ 4df0589 cli: fix rad inbox clear output │
├────────────────────────────────────────────────────────────────────────────────┤
│ ● Revision 09696ee @ bd8e0eb..4df0589 by fintohaps z6Mkire…SQZ3voM 2 years ago │
│ ↑ Revision 386d835 @ 8bf8719..3556758 by cloudhead z6MksFq…bS9wzpT 2 years ago │
│ └─ ✓ merged by cloudhead z6MksFq…bS9wzpT │
╰────────────────────────────────────────────────────────────────────────────────╯
commit 4df058950d96ae133b294ceb757a42b5f98bba7b
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Tue Apr 9 10:49:52 2024 +0100
cli: fix rad inbox clear output
If multiple ids are specified for `rad inbox clear`, it would report
that only 1 item was cleared, when in fact multiple were.
This was found to be due to the SQL code returning a change count of
`1`. This is likely due to the way the statement is being reset each
time. The `sqlite` library does not seem to easily support the usage
of `IN` in a `WHERE` clause. So instead, the `count` is aggregated in
the loop and returned instead.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
diff --git a/radicle-cli/examples/rad-inbox.md b/radicle-cli/examples/rad-inbox.md
index bdcdb8075..13a714a8c 100644
--- a/radicle-cli/examples/rad-inbox.md
+++ b/radicle-cli/examples/rad-inbox.md
@@ -85,7 +85,7 @@ $ rad inbox show 1
```
``` ~alice
-$ rad inbox clear
+$ rad inbox clear 1 2
✓ Cleared 2 item(s) from your inbox
$ rad inbox
Your inbox is empty.
diff --git a/radicle/src/node/notifications/store.rs b/radicle/src/node/notifications/store.rs
index eb6f240f5..ac7c37500 100644
--- a/radicle/src/node/notifications/store.rs
+++ b/radicle/src/node/notifications/store.rs
@@ -196,12 +196,16 @@ impl Store<Write> {
.db
.prepare("DELETE FROM `repository-notifications` WHERE rowid = ?")?;
+ // N.b. we need to keep the count manually since the change count
+ // will always be `1` because of each reset.
+ let mut count = 0;
for id in ids {
stmt.bind((1, *id as i64))?;
stmt.next()?;
stmt.reset()?;
+ count += self.db.change_count();
}
- Ok(self.db.change_count())
+ Ok(count)
})
}
Exit code: 0
shell: 'cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny clippy::all cargo build --all-targets --workspace cargo doc --workspace cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name f2d1cac9-d02e-44aa-8d33-634fd0fc4eb1 -v /opt/radcis/ci.rad.levitte.org/cci/state/f2d1cac9-d02e-44aa-8d33-634fd0fc4eb1/s:/f2d1cac9-d02e-44aa-8d33-634fd0fc4eb1/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/f2d1cac9-d02e-44aa-8d33-634fd0fc4eb1/w:/f2d1cac9-d02e-44aa-8d33-634fd0fc4eb1/w -w /f2d1cac9-d02e-44aa-8d33-634fd0fc4eb1/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:trixie bash /f2d1cac9-d02e-44aa-8d33-634fd0fc4eb1/s/script.sh
+ cargo --version
info: syncing channel updates for '1.77-x86_64-unknown-linux-gnu'
info: latest update on 2024-04-09, rust version 1.77.2 (25ef9e3d8 2024-04-09)
info: downloading component 'cargo'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-std'
info: installing component 'rustc'
cargo 1.77.2 (e52e36006 2024-03-26)
+ rustc --version
rustc 1.77.2 (25ef9e3d8 2024-04-09)
+ cargo fmt --check
error: 'cargo-fmt' is not installed for the toolchain '1.77-x86_64-unknown-linux-gnu'.
To install, run `rustup component add --toolchain 1.77-x86_64-unknown-linux-gnu rustfmt`
Exit code: 1
{
"response": "finished",
"result": "failure"
}