rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood4c2e0769550fd430169fcd5b07f4261845da26f2
{
"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:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Created",
"patch": {
"id": "e72fa571339c7906384b8b7445319dfd7c1f9fcb",
"author": {
"id": "did:key:z6MkkfM3tPXNPrPevKr3uSiQtHPuwnNhu2yUVjgd2jXVsVz5",
"alias": "sebastinez"
},
"title": "cli: Display errors in `patch ready` when wrong type of patch is provided",
"state": {
"status": "merged",
"conflicts": []
},
"before": "54aacc96197a48b79fcc260f94312d824f5e0a34",
"after": "4c2e0769550fd430169fcd5b07f4261845da26f2",
"commits": [
"4c2e0769550fd430169fcd5b07f4261845da26f2"
],
"target": "6cfed884bf37cba1e0d8e97fa8b0e94df4a04b1f",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "e72fa571339c7906384b8b7445319dfd7c1f9fcb",
"author": {
"id": "did:key:z6MkkfM3tPXNPrPevKr3uSiQtHPuwnNhu2yUVjgd2jXVsVz5",
"alias": "sebastinez"
},
"description": "Instead of doing nothing and going to sync no change, we should display\nsome error to the users that we haven't been able to apply the changes.",
"base": "54aacc96197a48b79fcc260f94312d824f5e0a34",
"oid": "4c2e0769550fd430169fcd5b07f4261845da26f2",
"timestamp": 1710502968
},
{
"id": "b02afb245fbcb939a37aaf8f711f5984a8f872e9",
"author": {
"id": "did:key:z6MkkfM3tPXNPrPevKr3uSiQtHPuwnNhu2yUVjgd2jXVsVz5",
"alias": "sebastinez"
},
"description": "Improve and rebase.",
"base": "0a78b9cc5b25866a0df2231f9bea71fbfc0aa975",
"oid": "d38846baaeeb0bcfb9b19d3a6819a0aa87367042",
"timestamp": 1712150395
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "40d508f7-a14d-46e4-9e9a-4250c313fd10"
},
"info_url": "https://cci.rad.levitte.org//40d508f7-a14d-46e4-9e9a-4250c313fd10.html"
}
Started at: 2025-10-21 18:58:36.682441+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW added
✓ Remote-tracking branch cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW/master created for z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz added
✓ Remote-tracking branch erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz/master created for z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz
✓ 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/40d508f7-a14d-46e4-9e9a-4250c313fd10/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 125 issues · 15 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout e72fa571339c7906384b8b7445319dfd7c1f9fcb
✓ Switched to branch patch/e72fa57 at revision e72fa57
✓ Branch patch/e72fa57 setup to track rad/patches/e72fa571339c7906384b8b7445319dfd7c1f9fcb
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 4c2e0769550fd430169fcd5b07f4261845da26f2
HEAD is now at 4c2e0769 cli: Display errors in `patch ready` when wrong type of patch is provided
Exit code: 0
$ git show 4c2e0769550fd430169fcd5b07f4261845da26f2
commit 4c2e0769550fd430169fcd5b07f4261845da26f2
Author: Sebastian Martinez <me@sebastinez.dev>
Date: Fri Mar 15 12:41:32 2024 +0100
cli: Display errors in `patch ready` when wrong type of patch is provided
Instead of doing nothing and going to sync no change, we should display
some error to the users that we haven't been able to apply the changes.
diff --git a/radicle-cli/src/commands/patch.rs b/radicle-cli/src/commands/patch.rs
index f75710c9..34cd9f4c 100644
--- a/radicle-cli/src/commands/patch.rs
+++ b/radicle-cli/src/commands/patch.rs
@@ -732,7 +732,15 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
}
Operation::Ready { ref patch_id, undo } => {
let patch_id = patch_id.resolve::<PatchId>(&repository.backend)?;
- ready::run(&patch_id, undo, &profile, &repository)?;
+ let result = ready::run(&patch_id, undo, &profile, &repository)?;
+ let error_msg = if undo {
+ "this command is only able to put open patches back into draft state"
+ } else {
+ "this command is only able to put draft patches into open state"
+ };
+ if result == false {
+ return Err(anyhow!(error_msg));
+ }
}
Operation::Delete { patch_id } => {
let patch_id = patch_id.resolve::<PatchId>(&repository.backend)?;
diff --git a/radicle-cli/src/commands/patch/ready.rs b/radicle-cli/src/commands/patch/ready.rs
index 4ab878ba..b96200d8 100644
--- a/radicle-cli/src/commands/patch/ready.rs
+++ b/radicle-cli/src/commands/patch/ready.rs
@@ -8,7 +8,7 @@ pub fn run(
undo: bool,
profile: &Profile,
repository: &Repository,
-) -> anyhow::Result<()> {
+) -> anyhow::Result<bool> {
let signer = term::signer(profile)?;
let mut patches = profile.patches_mut(repository)?;
let Ok(mut patch) = patches.get_mut(patch_id) else {
@@ -16,9 +16,8 @@ pub fn run(
};
if undo {
- patch.unready(&signer)?;
+ Ok(patch.unready(&signer)?)
} else {
- patch.ready(&signer)?;
+ Ok(patch.ready(&signer)?)
}
- Ok(())
}
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 40d508f7-a14d-46e4-9e9a-4250c313fd10 -v /opt/radcis/ci.rad.levitte.org/cci/state/40d508f7-a14d-46e4-9e9a-4250c313fd10/s:/40d508f7-a14d-46e4-9e9a-4250c313fd10/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/40d508f7-a14d-46e4-9e9a-4250c313fd10/w:/40d508f7-a14d-46e4-9e9a-4250c313fd10/w -w /40d508f7-a14d-46e4-9e9a-4250c313fd10/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:bookworm bash /40d508f7-a14d-46e4-9e9a-4250c313fd10/s/script.sh
+ cargo --version
info: syncing channel updates for '1.74-x86_64-unknown-linux-gnu'
info: latest update on 2023-12-07, rust version 1.74.1 (a28077b28 2023-12-04)
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.74.1 (ecb9851af 2023-10-18)
+ rustc --version
rustc 1.74.1 (a28077b28 2023-12-04)
+ cargo fmt --check
error: 'cargo-fmt' is not installed for the toolchain '1.74-x86_64-unknown-linux-gnu'.
To install, run `rustup component add --toolchain 1.74-x86_64-unknown-linux-gnu rustfmt`
Exit code: 1
{
"response": "finished",
"result": "failure"
}