OPC # 0009: Fix Worker gitea HttpClient missing token and base URL
controlplane/build ✔ Build succeeded.
controlplane/build ✔ Build succeeded.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Diagnostics;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
@@ -210,15 +209,11 @@ public sealed class BuildConsumer(
|
||||
{
|
||||
try
|
||||
{
|
||||
var baseUrl = (config["Gitea:BaseUrl"] ?? "https://opc.clarity.test").TrimEnd('/');
|
||||
var owner = config["Gitea:Owner"] ?? "ClarityStack";
|
||||
var token = config["Gitea:Token"] ?? string.Empty;
|
||||
var owner = config["Gitea:Owner"] ?? "ClarityStack";
|
||||
|
||||
using var http = httpFactory.CreateClient("gitea");
|
||||
http.DefaultRequestHeaders.Authorization =
|
||||
new AuthenticationHeaderValue("token", token);
|
||||
|
||||
var url = $"{baseUrl}/api/v1/repos/{owner}/{repoName}/statuses/{sha}";
|
||||
var url = $"api/v1/repos/{owner}/{repoName}/statuses/{sha}";
|
||||
var body = JsonSerializer.Serialize(new
|
||||
{
|
||||
state,
|
||||
|
||||
Reference in New Issue
Block a user