public BuildInfo( BuildKey buildKey, BuildDefinitionInfo buildDefinitionInfo, GitHubInfo?gitHubInfo, DateTime?startTime, DateTime?finishTime) { Key = buildKey; DefinitionInfo = buildDefinitionInfo; GitHubInfo = gitHubInfo; PullRequestNumber = null; StartTime = startTime; FinishTime = finishTime; }
public static bool TryParseBuildKey(Uri uri, out BuildKey buildKey) { var regex = new Regex(@"https://dev.azure.com/(\w+)/(\w+)/.*buildId=(\d+)"); var match = regex.Match(uri.ToString()); if (match.Success && int.TryParse(match.Groups[3].Value, out var buildId)) { buildKey = new BuildKey(match.Groups[1].Value, match.Groups[2].Value, buildId); return(true); } buildKey = default; return(false); }
public BuildInfo( BuildKey buildKey, BuildDefinitionInfo buildDefinitionInfo, GitHubPullRequestKey pullRequestKey, DateTime?startTime, DateTime?finishTime) { Key = buildKey; DefinitionInfo = buildDefinitionInfo; GitHubInfo = new GitHubInfo(pullRequestKey.Organization, pullRequestKey.Repository); PullRequestNumber = pullRequestKey.Number; StartTime = startTime; FinishTime = finishTime; }
public BuildInfo( BuildKey buildKey, BuildDefinitionInfo buildDefinitionInfo, string?gitHubOrganization, string?gitHubRepository, int?pullRequestNumber, DateTime?startTime, DateTime?finishTime) { Key = buildKey; DefinitionInfo = buildDefinitionInfo; if (gitHubOrganization is object && gitHubRepository is object) { GitHubInfo = new GitHubInfo(gitHubOrganization, gitHubRepository); PullRequestNumber = pullRequestNumber; } StartTime = startTime; FinishTime = finishTime; }
public BuildAttemptKey(BuildKey buildKey, int attempt) { BuildKey = buildKey; Attempt = attempt; }
public BuildAttemptKey(Build build, Timeline timeline) { BuildKey = new BuildKey(build); Attempt = timeline.GetAttempt(); }
public BuildAttemptKey(string organization, string project, int number, int attempt) { BuildKey = new BuildKey(organization, project, number); Attempt = attempt; }