From adeb908b8463bf985fbcd1f86dded78fddb3a9c2 Mon Sep 17 00:00:00 2001 From: Eli Schleifer <1265982+EliSchleifer@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:24:22 -0800 Subject: [PATCH] if-change rule should not run on upstream. it only cares about current changes (#54) 1) if-change rule should not run on upstream. it only cares about current changes 2) enable caching of trunk-toolbox runs --- .trunk/trunk.yaml | 1 + src/rules/if_change_then_change.rs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index f7dcbbd..5152a60 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -32,6 +32,7 @@ lint: batch: true success_codes: [0] read_output_from: tmp_file + cache_results: true disable_upstream: false max_concurrency: 1 direct_configs: [toolbox.toml, log4rs.yaml] diff --git a/src/rules/if_change_then_change.rs b/src/rules/if_change_then_change.rs index 08ddd4f..48a3798 100644 --- a/src/rules/if_change_then_change.rs +++ b/src/rules/if_change_then_change.rs @@ -126,6 +126,11 @@ pub fn ictc(run: &Run, upstream: &str) -> anyhow::Result