diff --git a/server/Tingle.Dependabot/Models/DependabotUpdateJobDefinition.cs b/server/Tingle.Dependabot/Models/DependabotUpdateJobDefinition.cs index ddd7ca5b..7374ec23 100644 --- a/server/Tingle.Dependabot/Models/DependabotUpdateJobDefinition.cs +++ b/server/Tingle.Dependabot/Models/DependabotUpdateJobDefinition.cs @@ -4,15 +4,6 @@ namespace Tingle.Dependabot.Models; -public sealed class DependabotUpdateJobDefinition -{ - [JsonPropertyName("job")] - public required JsonObject? Job { get; set; } - - [JsonPropertyName("credentials")] - public required JsonArray Credentials { get; set; } -} - public sealed class CreatePullRequestModel { [Required] diff --git a/server/Tingle.Dependabot/Workflow/UpdateRunner.cs b/server/Tingle.Dependabot/Workflow/UpdateRunner.cs index d39f49b7..c4c642ba 100644 --- a/server/Tingle.Dependabot/Workflow/UpdateRunner.cs +++ b/server/Tingle.Dependabot/Workflow/UpdateRunner.cs @@ -285,9 +285,9 @@ internal async Task WriteJobDefinitionAsync(RepositoryUpdate update, var url = options.ProjectUrl!.Value; var credentialsMetadata = MakeCredentialsMetadata(credentials); - var definition = new DependabotUpdateJobDefinition + var definition = new JsonObject { - Job = new JsonObject + ["job"] = new JsonObject { ["allowed-updates"] = ToJsonNode(update.Allow ?? new()), ["credentials-metadata"] = ToJsonNode(credentialsMetadata).AsArray(), @@ -320,7 +320,7 @@ internal async Task WriteJobDefinitionAsync(RepositoryUpdate update, ["security-updates-only"] = update.OpenPullRequestsLimit == 0, ["debug"] = false, }, - Credentials = ToJsonNode(credentials).AsArray(), + ["credentials"] = ToJsonNode(credentials).AsArray(), }; // write the job definition file