Merge branch 'dev'
This commit is contained in:
commit
efc19808f5
38
src/CodeRelease/.editorconfig
Normal file
38
src/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 # 推荐使用顶层语句,不强制要求
|
||||||
|
|
||||||
|
|
@ -3,7 +3,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.10.34916.146
|
VisualStudioVersion = 17.10.34916.146
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeRelease", "CodeRelease\CodeRelease.csproj", "{C58D2D43-B90B-4CEA-810F-99027F8F865A}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeRelease", "CodeRelease\CodeRelease.csproj", "{C58D2D43-B90B-4CEA-810F-99027F8F865A}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{74FD82FD-055B-45E9-AE81-0CAFDF083ECB}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
.editorconfig = .editorconfig
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,12 @@
|
||||||
using CodeRelease.Model;
|
using CodeRelease.Model;
|
||||||
using CodeRelease.Utile;
|
using CodeRelease.Utile;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Http;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Newtonsoft.Json.Serialization;
|
using Newtonsoft.Json.Serialization;
|
||||||
|
|
||||||
using System;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace CodeRelease.Controllers
|
namespace CodeRelease.Controllers
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
namespace CodeRelease.Model
|
namespace CodeRelease.Model
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
using CodeRelease.Model;
|
using CodeRelease.Model;
|
||||||
using CodeRelease.Utile;
|
using CodeRelease.Utile;
|
||||||
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
using CodeRelease.Model;
|
using CodeRelease.Model;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
using static System.Net.Mime.MediaTypeNames;
|
|
||||||
|
|
||||||
namespace CodeRelease.Utile
|
namespace CodeRelease.Utile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -27,7 +23,7 @@ namespace CodeRelease.Utile
|
||||||
var key = authorization.ToString();
|
var key = authorization.ToString();
|
||||||
if (!string.IsNullOrEmpty(key))
|
if (!string.IsNullOrEmpty(key))
|
||||||
{
|
{
|
||||||
var tempgiteaWebhookConfig = giteaWebhookConfigModels.FirstOrDefault(it => it.Name == key);
|
var tempgiteaWebhookConfig = giteaWebhookConfigModels.FirstOrDefault(it => it.Name == key);
|
||||||
if (tempgiteaWebhookConfig == null)
|
if (tempgiteaWebhookConfig == null)
|
||||||
{
|
{
|
||||||
if (giteaWebhookConfigModels.Count > 0)
|
if (giteaWebhookConfigModels.Count > 0)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
using System;
|
using System.IO.Compression;
|
||||||
using System.IO;
|
|
||||||
using System.IO.Compression;
|
|
||||||
namespace CodeRelease.Utile
|
namespace CodeRelease.Utile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user