Increase character limit for git branch ID generation to 16, remove vk prefix (#816)

This commit is contained in:
Alex Netsch
2025-09-23 13:49:23 +01:00
committed by GitHub
parent 7a2473e9be
commit d82f5a0dfa
2 changed files with 3 additions and 3 deletions

View File

@@ -533,7 +533,7 @@ impl LocalContainerService {
pub fn dir_name_from_task_attempt(attempt_id: &Uuid, task_title: &str) -> String {
let task_title_id = git_branch_id(task_title);
format!("vk-{}-{}", short_uuid(attempt_id), task_title_id)
format!("{}-{}", short_uuid(attempt_id), task_title_id)
}
pub fn git_branch_from_task_attempt(attempt_id: &Uuid, task_title: &str) -> String {

View File

@@ -12,8 +12,8 @@ pub fn git_branch_id(input: &str) -> String {
// 3. trim extra hyphens
let trimmed = slug.trim_matches('-');
// 4. take up to 10 chars, then trim trailing hyphens again
let cut: String = trimmed.chars().take(10).collect();
// 4. take up to 16 chars, then trim trailing hyphens again
let cut: String = trimmed.chars().take(16).collect();
cut.trim_end_matches('-').to_string()
}