OPC # 0001: Extract OPC into standalone repo
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user