修改代码
This commit is contained in:
parent
efc19808f5
commit
b50b2fc5c4
38
src/CodeRelease/CodeRelease/.editorconfig
Normal file
38
src/CodeRelease/CodeRelease/.editorconfig
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# 全部文件
|
||||||
|
[*]
|
||||||
|
indent_style = space #指定缩进风格,可以是tab(制表符)或space(空格)
|
||||||
|
|
||||||
|
# Xml files
|
||||||
|
[*.xml]
|
||||||
|
indent_size = 2 #定义一个缩进级别的大小。
|
||||||
|
|
||||||
|
[*.cs]
|
||||||
|
end_of_line = lf #指定换行符的类型,可以是lf(Unix/Linux)、crlf(Windows)或cr(老式的Mac OS)。
|
||||||
|
indent_style = space #指定缩进风格,可以是tab(制表符)或space(空格)
|
||||||
|
charset = utf-8 #设置文件字符集为utf-8,在 Linux 系统中,通常推荐使用 UTF-8 而不是 UTF-8 with BOM。添加 BOM 可能会干扰那些不期望在文件开头出现非 ASCII 字节的软件对 UTF-8 的使用。
|
||||||
|
trim_trailing_whitespace = true #指定是否删除行尾的空白字符。
|
||||||
|
insert_final_newline = true #指定文件末尾是否应该插入一个空白行。
|
||||||
|
indent_size = 4
|
||||||
|
# 模式匹配的偏好设置
|
||||||
|
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion # 推荐使用模式匹配而非 is 与类型转换检查
|
||||||
|
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion # 推荐使用模式匹配而非 as 与 null 检查
|
||||||
|
|
||||||
|
# 空检查的偏好设置
|
||||||
|
csharp_style_throw_expression = true:suggestion # 推荐使用 throw 表达式
|
||||||
|
csharp_style_conditional_delegate_call = true:suggestion # 推荐使用条件委托调用
|
||||||
|
|
||||||
|
# 修饰符的偏好设置
|
||||||
|
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion # 修饰符的推荐顺序
|
||||||
|
|
||||||
|
# 表达式级别的偏好设置
|
||||||
|
csharp_prefer_braces = true:silent # 推荐使用大括号,即使在可能省略的情况下
|
||||||
|
csharp_style_deconstructed_variable_declaration = true:suggestion # 推荐使用解构变量声明
|
||||||
|
csharp_prefer_simple_default_expression = true:suggestion # 推荐使用简化的默认值表达式
|
||||||
|
csharp_style_prefer_local_over_anonymous_function = true:suggestion # 推荐使用本地函数而非匿名函数
|
||||||
|
csharp_style_inlined_variable_declaration = true:suggestion # 推荐内联变量声明
|
||||||
|
# 首选顶层语句的偏好设置
|
||||||
|
csharp_style_prefer_top_level_statements = true:silent # 推荐使用顶层语句,不强制要求
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
|
@ -12,4 +12,12 @@
|
||||||
<PackageReference Include="System.Text.Json" Version="8.0.3" />
|
<PackageReference Include="System.Text.Json" Version="8.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EditorConfigFiles Remove="I:\Gitea\server\CodeRelease\src\CodeRelease\CodeRelease\.editorconfig" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="I:\Gitea\server\CodeRelease\src\CodeRelease\CodeRelease\.editorconfig" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -10,25 +10,25 @@ namespace CodeRelease.Model
|
||||||
/// 发布的动作
|
/// 发布的动作
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("action")]
|
[JsonProperty("action")]
|
||||||
public string Action { get; set; }
|
public required string Action { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发布信息
|
/// 发布信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("release")]
|
[JsonProperty("release")]
|
||||||
public Release Release { get; set; }
|
public required Release Release { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库信息
|
/// 仓库信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("repository")]
|
[JsonProperty("repository")]
|
||||||
public Repository Repository { get; set; }
|
public required Repository Repository { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发送者信息
|
/// 发送者信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("sender")]
|
[JsonProperty("sender")]
|
||||||
public Sender Sender { get; set; }
|
public required Sender Sender { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -46,55 +46,55 @@ namespace CodeRelease.Model
|
||||||
/// 标签名称
|
/// 标签名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("tag_name")]
|
[JsonProperty("tag_name")]
|
||||||
public string TagName { get; set; }
|
public required string TagName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 目标分支
|
/// 目标分支
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("target_commitish")]
|
[JsonProperty("target_commitish")]
|
||||||
public string TargetCommitish { get; set; }
|
public required string TargetCommitish { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发布名称
|
/// 发布名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发布描述
|
/// 发布描述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("body")]
|
[JsonProperty("body")]
|
||||||
public string Body { get; set; }
|
public required string Body { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发布URL
|
/// 发布URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("url")]
|
[JsonProperty("url")]
|
||||||
public string Url { get; set; }
|
public required string Url { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发布HTML URL
|
/// 发布HTML URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("html_url")]
|
[JsonProperty("html_url")]
|
||||||
public string HtmlUrl { get; set; }
|
public required string HtmlUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// tarball文件URL
|
/// tarball文件URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("tarball_url")]
|
[JsonProperty("tarball_url")]
|
||||||
public string TarballUrl { get; set; }
|
public required string TarballUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// zipball文件URL
|
/// zipball文件URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("zipball_url")]
|
[JsonProperty("zipball_url")]
|
||||||
public string ZipballUrl { get; set; }
|
public required string ZipballUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 上传URL
|
/// 上传URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("upload_url")]
|
[JsonProperty("upload_url")]
|
||||||
public string UploadUrl { get; set; }
|
public required string UploadUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否为草稿
|
/// 是否为草稿
|
||||||
|
|
@ -124,13 +124,13 @@ namespace CodeRelease.Model
|
||||||
/// 作者信息
|
/// 作者信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("author")]
|
[JsonProperty("author")]
|
||||||
public Author Author { get; set; }
|
public required Author Author { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 资产列表
|
/// 资产列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("assets")]
|
[JsonProperty("assets")]
|
||||||
public List<Asset> Assets { get; set; }
|
public required List<Asset> Assets { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -148,13 +148,13 @@ namespace CodeRelease.Model
|
||||||
/// 登录名
|
/// 登录名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("login")]
|
[JsonProperty("login")]
|
||||||
public string Login { get; set; }
|
public required string Login { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 登录名称
|
/// 登录名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("login_name")]
|
[JsonProperty("login_name")]
|
||||||
public string LoginName { get; set; }
|
public required string LoginName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 来源ID
|
/// 来源ID
|
||||||
|
|
@ -166,31 +166,31 @@ namespace CodeRelease.Model
|
||||||
/// 全名
|
/// 全名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("full_name")]
|
[JsonProperty("full_name")]
|
||||||
public string FullName { get; set; }
|
public required string FullName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 邮箱
|
/// 邮箱
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("email")]
|
[JsonProperty("email")]
|
||||||
public string Email { get; set; }
|
public required string Email { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 头像URL
|
/// 头像URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("avatar_url")]
|
[JsonProperty("avatar_url")]
|
||||||
public string AvatarUrl { get; set; }
|
public required string AvatarUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// HTML URL
|
/// HTML URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("html_url")]
|
[JsonProperty("html_url")]
|
||||||
public string HtmlUrl { get; set; }
|
public required string HtmlUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 语言
|
/// 语言
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("language")]
|
[JsonProperty("language")]
|
||||||
public string Language { get; set; }
|
public required string Language { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否为管理员
|
/// 是否为管理员
|
||||||
|
|
@ -232,25 +232,25 @@ namespace CodeRelease.Model
|
||||||
/// 位置
|
/// 位置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("location")]
|
[JsonProperty("location")]
|
||||||
public string Location { get; set; }
|
public required string Location { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 个人网站
|
/// 个人网站
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("website")]
|
[JsonProperty("website")]
|
||||||
public string Website { get; set; }
|
public required string Website { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述
|
/// 描述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("description")]
|
[JsonProperty("description")]
|
||||||
public string Description { get; set; }
|
public required string Description { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 可见性
|
/// 可见性
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("visibility")]
|
[JsonProperty("visibility")]
|
||||||
public string Visibility { get; set; }
|
public required string Visibility { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 关注者数量
|
/// 关注者数量
|
||||||
|
|
@ -274,7 +274,7 @@ namespace CodeRelease.Model
|
||||||
/// 用户名
|
/// 用户名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("username")]
|
[JsonProperty("username")]
|
||||||
public string Username { get; set; }
|
public required string Username { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -292,7 +292,7 @@ namespace CodeRelease.Model
|
||||||
/// 资产名称
|
/// 资产名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 资产大小
|
/// 资产大小
|
||||||
|
|
@ -316,13 +316,13 @@ namespace CodeRelease.Model
|
||||||
/// 资产UUID
|
/// 资产UUID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("uuid")]
|
[JsonProperty("uuid")]
|
||||||
public string Uuid { get; set; }
|
public required string Uuid { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 浏览器下载URL
|
/// 浏览器下载URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("browser_download_url")]
|
[JsonProperty("browser_download_url")]
|
||||||
public string BrowserDownloadUrl { get; set; }
|
public required string BrowserDownloadUrl { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -340,25 +340,25 @@ namespace CodeRelease.Model
|
||||||
/// 拥有者信息
|
/// 拥有者信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("owner")]
|
[JsonProperty("owner")]
|
||||||
public Owner Owner { get; set; }
|
public required Owner Owner { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库名称
|
/// 仓库名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库全名
|
/// 仓库全名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("full_name")]
|
[JsonProperty("full_name")]
|
||||||
public string FullName { get; set; }
|
public required string FullName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库描述
|
/// 仓库描述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("description")]
|
[JsonProperty("description")]
|
||||||
public string Description { get; set; }
|
public required string Description { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库是否为空
|
/// 仓库是否为空
|
||||||
|
|
@ -388,7 +388,7 @@ namespace CodeRelease.Model
|
||||||
/// 父仓库
|
/// 父仓库
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("parent")]
|
[JsonProperty("parent")]
|
||||||
public object Parent { get; set; }
|
public required object Parent { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否为镜像仓库
|
/// 是否为镜像仓库
|
||||||
|
|
@ -406,55 +406,55 @@ namespace CodeRelease.Model
|
||||||
/// 仓库语言
|
/// 仓库语言
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("language")]
|
[JsonProperty("language")]
|
||||||
public string Language { get; set; }
|
public required string Language { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库语言URL
|
/// 仓库语言URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("languages_url")]
|
[JsonProperty("languages_url")]
|
||||||
public string LanguagesUrl { get; set; }
|
public required string LanguagesUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库HTML URL
|
/// 仓库HTML URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("html_url")]
|
[JsonProperty("html_url")]
|
||||||
public string HtmlUrl { get; set; }
|
public required string HtmlUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库API URL
|
/// 仓库API URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("url")]
|
[JsonProperty("url")]
|
||||||
public string Url { get; set; }
|
public required string Url { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库链接
|
/// 仓库链接
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("link")]
|
[JsonProperty("link")]
|
||||||
public string Link { get; set; }
|
public required string Link { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库SSH URL
|
/// 仓库SSH URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("ssh_url")]
|
[JsonProperty("ssh_url")]
|
||||||
public string SshUrl { get; set; }
|
public required string SshUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库克隆 URL
|
/// 仓库克隆 URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("clone_url")]
|
[JsonProperty("clone_url")]
|
||||||
public string CloneUrl { get; set; }
|
public required string CloneUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 原始 URL
|
/// 原始 URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("original_url")]
|
[JsonProperty("original_url")]
|
||||||
public string OriginalUrl { get; set; }
|
public required string OriginalUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库网站
|
/// 仓库网站
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("website")]
|
[JsonProperty("website")]
|
||||||
public string Website { get; set; }
|
public required string Website { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 星标数量
|
/// 星标数量
|
||||||
|
|
@ -496,7 +496,7 @@ namespace CodeRelease.Model
|
||||||
/// 默认分支
|
/// 默认分支
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("default_branch")]
|
[JsonProperty("default_branch")]
|
||||||
public string DefaultBranch { get; set; }
|
public required string DefaultBranch { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否存档
|
/// 是否存档
|
||||||
|
|
@ -526,7 +526,7 @@ namespace CodeRelease.Model
|
||||||
/// 权限信息
|
/// 权限信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("permissions")]
|
[JsonProperty("permissions")]
|
||||||
public Permissions Permissions { get; set; }
|
public required Permissions Permissions { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否有问题跟踪
|
/// 是否有问题跟踪
|
||||||
|
|
@ -538,7 +538,7 @@ namespace CodeRelease.Model
|
||||||
/// 内部问题跟踪器
|
/// 内部问题跟踪器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("internal_tracker")]
|
[JsonProperty("internal_tracker")]
|
||||||
public InternalTracker InternalTracker { get; set; }
|
public required InternalTracker InternalTracker { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否有Wiki
|
/// 是否有Wiki
|
||||||
|
|
@ -562,7 +562,7 @@ namespace CodeRelease.Model
|
||||||
/// 项目模式
|
/// 项目模式
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("projects_mode")]
|
[JsonProperty("projects_mode")]
|
||||||
public string ProjectsMode { get; set; }
|
public required string ProjectsMode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否有发布
|
/// 是否有发布
|
||||||
|
|
@ -634,7 +634,7 @@ namespace CodeRelease.Model
|
||||||
/// 默认合并样式
|
/// 默认合并样式
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("default_merge_style")]
|
[JsonProperty("default_merge_style")]
|
||||||
public string DefaultMergeStyle { get; set; }
|
public required string DefaultMergeStyle { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否默认允许维护者编辑
|
/// 是否默认允许维护者编辑
|
||||||
|
|
@ -646,7 +646,7 @@ namespace CodeRelease.Model
|
||||||
/// 头像URL
|
/// 头像URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("avatar_url")]
|
[JsonProperty("avatar_url")]
|
||||||
public string AvatarUrl { get; set; }
|
public required string AvatarUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否为内部仓库
|
/// 是否为内部仓库
|
||||||
|
|
@ -658,13 +658,13 @@ namespace CodeRelease.Model
|
||||||
/// 镜像间隔
|
/// 镜像间隔
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("mirror_interval")]
|
[JsonProperty("mirror_interval")]
|
||||||
public string MirrorInterval { get; set; }
|
public required string MirrorInterval { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 对象格式名称
|
/// 对象格式名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("object_format_name")]
|
[JsonProperty("object_format_name")]
|
||||||
public string ObjectFormatName { get; set; }
|
public required string ObjectFormatName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 镜像更新时间
|
/// 镜像更新时间
|
||||||
|
|
@ -676,7 +676,7 @@ namespace CodeRelease.Model
|
||||||
/// 仓库转移
|
/// 仓库转移
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("repo_transfer")]
|
[JsonProperty("repo_transfer")]
|
||||||
public object RepoTransfer { get; set; }
|
public required object RepoTransfer { get; set; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓库所有者
|
/// 仓库所有者
|
||||||
|
|
@ -691,12 +691,12 @@ namespace CodeRelease.Model
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 登录名
|
/// 登录名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Login { get; set; }
|
public required string Login { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 登录名称
|
/// 登录名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string LoginName { get; set; }
|
public required string LoginName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 来源ID
|
/// 来源ID
|
||||||
|
|
@ -706,27 +706,27 @@ namespace CodeRelease.Model
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 全名
|
/// 全名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string FullName { get; set; }
|
public required string FullName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 邮箱
|
/// 邮箱
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Email { get; set; }
|
public required string Email { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 头像 URL
|
/// 头像 URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string AvatarUrl { get; set; }
|
public required string AvatarUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// HTML URL
|
/// HTML URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string HtmlUrl { get; set; }
|
public required string HtmlUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 语言
|
/// 语言
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Language { get; set; }
|
public required string Language { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否为管理员
|
/// 是否为管理员
|
||||||
|
|
@ -761,22 +761,22 @@ namespace CodeRelease.Model
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 位置
|
/// 位置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Location { get; set; }
|
public required string Location { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 网站
|
/// 网站
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Website { get; set; }
|
public required string Website { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述
|
/// 描述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Description { get; set; }
|
public required string Description { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 可见性
|
/// 可见性
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Visibility { get; set; }
|
public required string Visibility { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 粉丝数量
|
/// 粉丝数量
|
||||||
|
|
@ -796,7 +796,7 @@ namespace CodeRelease.Model
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户名
|
/// 用户名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Username { get; set; }
|
public required string Username { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -854,12 +854,12 @@ namespace CodeRelease.Model
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 登录名
|
/// 登录名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Login { get; set; }
|
public required string Login { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 登录名称
|
/// 登录名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string LoginName { get; set; }
|
public required string LoginName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 来源ID
|
/// 来源ID
|
||||||
|
|
@ -869,27 +869,27 @@ namespace CodeRelease.Model
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 全名
|
/// 全名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string FullName { get; set; }
|
public required string FullName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 邮箱
|
/// 邮箱
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Email { get; set; }
|
public required string Email { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 头像 URL
|
/// 头像 URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string AvatarUrl { get; set; }
|
public required string AvatarUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// HTML URL
|
/// HTML URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string HtmlUrl { get; set; }
|
public required string HtmlUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 语言
|
/// 语言
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Language { get; set; }
|
public required string Language { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否为管理员
|
/// 是否为管理员
|
||||||
|
|
@ -924,22 +924,22 @@ namespace CodeRelease.Model
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 位置
|
/// 位置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Location { get; set; }
|
public required string Location { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 网站
|
/// 网站
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Website { get; set; }
|
public required string Website { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述
|
/// 描述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Description { get; set; }
|
public required string Description { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 可见性
|
/// 可见性
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Visibility { get; set; }
|
public required string Visibility { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 粉丝数量
|
/// 粉丝数量
|
||||||
|
|
@ -959,7 +959,7 @@ namespace CodeRelease.Model
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户名
|
/// 用户名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Username { get; set; }
|
public required string Username { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,15 @@
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 名字
|
/// 名字
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// make命令
|
/// make命令
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string MakeFile { get; set; }
|
public required string MakeFile { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 下载后地址
|
/// 下载后地址
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string BrowserDownloadFileUrl { get; set; }
|
public required string BrowserDownloadFileUrl { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,6 @@ app.MapControllers();
|
||||||
app.UseMiddleware<GiteaWebhookConfigMiddleware>();
|
app.UseMiddleware<GiteaWebhookConfigMiddleware>();
|
||||||
app.MapGet("/", () =>
|
app.MapGet("/", () =>
|
||||||
{
|
{
|
||||||
return "请求成功";
|
return "请求成功";
|
||||||
}).WithName("默认请求");
|
}).WithName("默认请求");
|
||||||
app.Run();
|
app.Run();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
namespace CodeRelease.Utile
|
namespace CodeRelease.Utile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 下载文件
|
/// 下载文件
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
return true;
|
return true;
|
||||||
//Console.WriteLine("文件下载成功!");
|
//Console.WriteLine("文件下载成功!");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
//Console.WriteLine($"文件下载失败: {ex.Message}");
|
//Console.WriteLine($"文件下载失败: {ex.Message}");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
namespace CodeRelease.Utile
|
namespace CodeRelease.Utile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -26,7 +26,7 @@ namespace CodeRelease.Utile
|
||||||
|
|
||||||
//Console.WriteLine("文件解压成功!");
|
//Console.WriteLine("文件解压成功!");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
//Console.WriteLine($"文件解压失败: {ex.Message}");
|
//Console.WriteLine($"文件解压失败: {ex.Message}");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user