-
Notifications
You must be signed in to change notification settings - Fork 652
/
Copy pathBranchClassifier.cs
57 lines (47 loc) · 1.4 KB
/
BranchClassifier.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
namespace GitVersion
{
using LibGit2Sharp;
static class BranchClassifier
{
public static bool IsHotfix(this Branch branch)
{
return branch.Name.IsHotfix();
}
public static string GetHotfixSuffix(this Branch branch)
{
return branch.Name.GetHotfixSuffix();
}
public static bool IsRelease(this Branch branch)
{
return branch.Name.IsRelease();
}
public static string GetReleaseSuffix(this Branch branch)
{
return branch.Name.GetReleaseSuffix();
}
public static string GetUnknownBranchSuffix(this Branch branch)
{
return branch.Name.GetUnknownBranchSuffix();
}
public static string GetSuffix(this Branch branch, BranchType branchType)
{
return branch.CanonicalName.GetSuffix(branchType);
}
public static bool IsDevelop(this Branch branch)
{
return branch.Name.IsDevelop();
}
public static bool IsMaster(this Branch branch)
{
return branch.Name.IsMaster();
}
public static bool IsPullRequest(this Branch branch)
{
return branch.CanonicalName.IsPullRequest();
}
public static bool IsSupport(this Branch branch)
{
return branch.Name.IsSupport();
}
}
}