Skip to content

Commit bd971f1

Browse files
committed
Add bounds check and logging for ref_id_parts processing
1 parent 6d89fa1 commit bd971f1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/jobs/commit_job.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,15 @@ impl CommitJobInstance {
122122
let unwanted_exts = [".Debug", ".Locale", ".Sources", ".Docs"];
123123
let ref_id_parts: Vec<&str> = build_ref.ref_name.split('/').collect();
124124

125+
job_log_and_info!(
126+
self.job_id,
127+
conn,
128+
&format!("Processing ref parts: {:?}", ref_id_parts),
129+
);
130+
125131
if build_ref.ref_name.starts_with("app/")
126132
|| (build_ref.ref_name.starts_with("runtime/")
133+
&& ref_id_parts.len() > 1
127134
&& !unwanted_exts
128135
.iter()
129136
.any(|&ext| ref_id_parts[1].ends_with(ext)))

0 commit comments

Comments
 (0)