OPC # 0001: Extract OPC into standalone repo

This commit is contained in:
amadzarak
2026-04-25 17:26:42 -04:00
commit 42383bdc03
170 changed files with 21365 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
namespace ControlPlane.Core.Models;
// ── Repository ────────────────────────────────────────────────────────────────
public record GiteaRepo(
long Id,
string Name,
string FullName,
string DefaultBranch,
string CloneUrl,
string SshUrl,
bool Private
);
// ── Branch ────────────────────────────────────────────────────────────────────
public record GiteaBranch(
string Name,
string CommitSha,
bool Protected
);
// ── Pull Request ──────────────────────────────────────────────────────────────
public record GiteaPullRequest(
long Number,
string Title,
string State, // open | closed | merged
string HeadBranch,
string BaseBranch,
string HtmlUrl,
string CreatedAt,
string UpdatedAt,
GiteaUser? User,
GiteaMergeInfo? MergeInfo
);
public record GiteaUser(string Login, string AvatarUrl);
public record GiteaMergeInfo(bool Mergeable, bool Merged, string? MergedAt);
// ── Tag ───────────────────────────────────────────────────────────────────────
public record GiteaTag(string Name, string CommitSha, string ZipUrl);
// ── Webhook ───────────────────────────────────────────────────────────────────
public record GiteaWebhook(long Id, string Url, bool Active, string[] Events);
// ── Request shapes ────────────────────────────────────────────────────────────
public record CreateBranchRequest(string OpcNumber, string OpcTitle, string From = "master");
public record CreatePullRequestRequest(
string Title,
string Head,
string Base,
string Body
);
public record CreateTagRequest(string TagName, string Message, string CommitSha);
public record CreateWebhookRequest(string TargetUrl, string[] Events);