diff --git a/visual-dotnet/SauceLabs.Visual/CreateBuildOptions.cs b/visual-dotnet/SauceLabs.Visual/CreateBuildOptions.cs index 18808565..3edfaea5 100644 --- a/visual-dotnet/SauceLabs.Visual/CreateBuildOptions.cs +++ b/visual-dotnet/SauceLabs.Visual/CreateBuildOptions.cs @@ -13,5 +13,6 @@ public class CreateBuildOptions public string? Project { get; set; } public string? Branch { get; set; } public string? CustomId { get; set; } + public string? DefaultBranch { get; set; } } } \ No newline at end of file diff --git a/visual-dotnet/SauceLabs.Visual/GraphQL/CreateBuild.cs b/visual-dotnet/SauceLabs.Visual/GraphQL/CreateBuild.cs index df55235b..00037707 100644 --- a/visual-dotnet/SauceLabs.Visual/GraphQL/CreateBuild.cs +++ b/visual-dotnet/SauceLabs.Visual/GraphQL/CreateBuild.cs @@ -16,8 +16,10 @@ internal class CreateBuild public string? Branch { get; } [JsonProperty("customId")] public string? CustomId { get; } + [JsonProperty("defaultBranch")] + public string? DefaultBranch { get; } - public CreateBuild(string id, string name, string url, string? project, string? branch, string? customId) + public CreateBuild(string id, string name, string url, string? project, string? branch, string? customId, string? defaultBranch) { Id = id; Name = name; @@ -25,6 +27,7 @@ public CreateBuild(string id, string name, string url, string? project, string? Project = project; Branch = branch; CustomId = customId; + DefaultBranch = defaultBranch; } } } \ No newline at end of file diff --git a/visual-dotnet/SauceLabs.Visual/GraphQL/CreateBuildIn.cs b/visual-dotnet/SauceLabs.Visual/GraphQL/CreateBuildIn.cs index 2fbb8da1..67e8faef 100644 --- a/visual-dotnet/SauceLabs.Visual/GraphQL/CreateBuildIn.cs +++ b/visual-dotnet/SauceLabs.Visual/GraphQL/CreateBuildIn.cs @@ -12,5 +12,7 @@ internal class CreateBuildIn public string? Branch { get; set; } [JsonProperty("customId")] public string? CustomId { get; set; } + [JsonProperty("defaultBranch")] + public string? DefaultBranch { get; set; } } } \ No newline at end of file diff --git a/visual-dotnet/SauceLabs.Visual/GraphQL/CreateBuildMutation.cs b/visual-dotnet/SauceLabs.Visual/GraphQL/CreateBuildMutation.cs index 322a16fa..4a1cb783 100644 --- a/visual-dotnet/SauceLabs.Visual/GraphQL/CreateBuildMutation.cs +++ b/visual-dotnet/SauceLabs.Visual/GraphQL/CreateBuildMutation.cs @@ -12,7 +12,8 @@ mutation createBuild($input: BuildIn!) { url, project, branch, - name + name, + defaultBranch } } "; diff --git a/visual-dotnet/SauceLabs.Visual/VisualClient.cs b/visual-dotnet/SauceLabs.Visual/VisualClient.cs index 85f6dae8..0f73709d 100644 --- a/visual-dotnet/SauceLabs.Visual/VisualClient.cs +++ b/visual-dotnet/SauceLabs.Visual/VisualClient.cs @@ -106,6 +106,7 @@ private async Task CreateBuild(CreateBuildOptions? options = null) Project = options?.Project, Branch = options?.Branch, CustomId = options?.CustomId, + DefaultBranch = options?.DefaultBranch, })).EnsureValidResponse(); return new VisualBuild(result.Result.Id, result.Result.Url); }