static string GetTaskNumber( string branch, string branchPrefix) { string branchName = BranchSpec.GetName(branch); if (string.IsNullOrEmpty(branchPrefix)) { return(branchName); } if (branchName.StartsWith(branchPrefix, StringComparison.InvariantCultureIgnoreCase)) { return(branchName.Substring(branchPrefix.Length)); } return(null); }
static bool ShouldBeProcessed( string eventRepository, string eventBranchFullName, string repoTracked, string branchPrefixTracked) { if (!RepositoryNameComparer.IsSameName(eventRepository, repoTracked)) { return(false); } if (string.IsNullOrEmpty(branchPrefixTracked)) { return(true); } string branchName = BranchSpec.GetName(eventBranchFullName); return(branchName.StartsWith(branchPrefixTracked, StringComparison.InvariantCultureIgnoreCase)); }