Skip to content

Commit e117b3e

Browse files
committed
wip
1 parent 1e9747d commit e117b3e

File tree

1 file changed

+7
-2
lines changed
  • .github/actions/clippy-annotation-reporter/src

1 file changed

+7
-2
lines changed

.github/actions/clippy-annotation-reporter/src/config.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,18 @@ impl Config {
181181

182182
// Set base branch (default to the PR's base branch or 'main')
183183
// TODO: EK - FIX THIS CLONE
184-
let base_branch = args.clone().base_branch.unwrap_or_else(|| {
184+
// TODO: EK - unclear if we even need command line args for this
185+
let base_branch_arg = args.clone().base_branch.unwrap_or_default();
186+
187+
let base_branch = if !base_branch_arg.is_empty() {
188+
format!("origin/{}", base_branch_arg)
189+
} else {
185190
if !github_ctx.base_ref.is_empty() {
186191
format!("origin/{}", github_ctx.base_ref)
187192
} else {
188193
"origin/main".to_string()
189194
}
190-
});
195+
};
191196

192197
// Set head branch (PR's head branch)
193198
let head_branch = if !github_ctx.head_ref.is_empty() {

0 commit comments

Comments
 (0)