Add support for tags.
This commit is contained in:
@@ -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.")?;
|
||||
|
||||
Reference in New Issue
Block a user