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:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"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": "7e1cb406bb935c3de008d2171e8961f57b4336ea",
"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": "d04f6ad1-7a61-4720-ad04-c8dac80b16ad"
},
"info_url": "https://cci.rad.levitte.org//d04f6ad1-7a61-4720-ad04-c8dac80b16ad.html"
}
Started at: 2026-09-08 22:32:19.577559+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/d04f6ad1-7a61-4720-ad04-c8dac80b16ad/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 189 issues · 39 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
$ rad patch show e72fa571339c7906384b8b7445319dfd7c1f9fcb -p
╭─────────────────────────────────────────────────────────────────────────────────────╮
│ Title cli: Display errors in `patch ready` when wrong type of patch is provided │
│ Patch e72fa571339c7906384b8b7445319dfd7c1f9fcb │
│ Author sebastinez z6MkkfM…jXVsVz5 │
│ Head 4c2e0769550fd430169fcd5b07f4261845da26f2 │
│ Base 54aacc96197a48b79fcc260f94312d824f5e0a34 │
│ Target master │
│ Branches patch/e72fa57 │
│ Commits ahead 1, behind 1531 │
│ Status merged │
│ │
│ 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. │
├─────────────────────────────────────────────────────────────────────────────────────┤
│ 4c2e076 cli: Display errors in `patch ready` when wrong type of patch is provided │
├─────────────────────────────────────────────────────────────────────────────────────┤
│ ● Revision e72fa57 @ 54aacc9..4c2e076 by sebastinez z6MkkfM…jXVsVz5 2 years ago │
│ └─ ✓ accepted by fintohaps z6Mkire…SQZ3voM 2 years ago │
│ ↑ Revision b02afb2 @ 0a78b9c..d38846b by cloudhead z6MksFq…bS9wzpT 2 years ago │
│ └─ ✓ merged by cloudhead z6MksFq…bS9wzpT │
╰─────────────────────────────────────────────────────────────────────────────────────╯
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 f75710c9bd..34cd9f4c02 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 4ab878ba89..b96200d8e4 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 d04f6ad1-7a61-4720-ad04-c8dac80b16ad -v /opt/radcis/ci.rad.levitte.org/cci/state/d04f6ad1-7a61-4720-ad04-c8dac80b16ad/s:/d04f6ad1-7a61-4720-ad04-c8dac80b16ad/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/d04f6ad1-7a61-4720-ad04-c8dac80b16ad/w:/d04f6ad1-7a61-4720-ad04-c8dac80b16ad/w -w /d04f6ad1-7a61-4720-ad04-c8dac80b16ad/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:trixie bash /d04f6ad1-7a61-4720-ad04-c8dac80b16ad/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"
}