Add support for tags.

This commit is contained in:
Tom Alexander
2024-09-29 00:06:46 -04:00
parent 1efd7b1d73
commit a2aca6d2f1
6 changed files with 205 additions and 42 deletions

View File

@@ -34,7 +34,7 @@ pub(crate) async fn discover_matching_push_triggers<RE: AsRef<str>>(
remote_config: &RemoteConfig,
) -> Result<Vec<PipelineTemplate>, Box<dyn std::error::Error>> {
let mut ret = Vec::new();
let ref_to_branch_regex = Regex::new(r"refs/heads/(?P<branch>.+)")?;
let ref_to_branch_regex = Regex::new(r"refs/(heads|tags)/(?P<branch>.+)")?;
let captures = ref_to_branch_regex
.captures(git_ref.as_ref())
.ok_or("Could not find branch name.")?;