Skip to content

Commit

Permalink
fix task.ref configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jhspetersson committed Sep 20, 2024
1 parent ffc98df commit 0470616
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operations/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub(crate) fn task_config_set(param: String, value: String, move_ref: bool) -> b
"task.ref" => {
let value = match value {
value if !value.contains('/') => "refs/heads/".to_string() + value.as_str(),
value if !value.starts_with('/') && !value.ends_with('/') => "refs/".to_string() + value.as_str(),
value if value.chars().filter(|c| *c == '/').count() == 1 && !value.starts_with('/') && !value.ends_with('/') => "refs/".to_string() + value.as_str(),
value => value,
};

Expand Down

0 comments on commit 0470616

Please sign in to comment.