{"Message":"1. 增加获取仓库所有提交历史逻辑;\r\n2. 增加对每次提交的评分机制;","MessageType":2,"Modules":[{"State":1,"Type":1,"Name":"PCPage/任务版本详情"},{"State":1,"Type":40,"Name":"Plugin"},{"State":1,"Type":7,"Name":"Table/Git仓库表"},{"State":1,"Type":15,"Name":"ServerCommand/GitCallback"},{"State":1,"Type":7,"Name":"Table/Git_事件记录"},{"State":1,"Type":1,"Name":"PCPage/选择Git仓库"},{"State":1,"Type":15,"Name":"ServerCommand/同步一个仓库到表"},{"State":1,"Type":31,"Name":"UserControlPage/Git仓库卡片"},{"State":3,"Type":15,"Name":"ServerCommand/仓库的所有提交"},{"State":3,"Type":15,"Name":"ServerCommand/服务端命令1"},{"State":3,"Type":15,"Name":"ServerCommand/服务端命令3"}],"Version":"v1"}

This commit is contained in:
超哥
2024-06-15 16:52:13 +08:00
parent c5de7bf388
commit b41e37409b
10 changed files with 998 additions and 547 deletions

View File

@@ -53,366 +53,204 @@
},
"CommandList": [
{
"$type": "JsonUtilityCommand.JsonDeserializeCommand, JsonUtilityCommand",
"JsonString": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.message"
},
"SampleJson": "{\r\n \"Message\": \"新增WebHook的订阅\",\r\n \"MessageType\": 2,\r\n \"Modules\": [\r\n {\r\n \"State\": 3,\r\n \"Type\": 15,\r\n \"Name\": \"ServerCommand/创建一个仓库WebHook\"\r\n }\r\n ],\r\n \"Version\": \"v1\"\r\n}",
"ToParameter": "message"
},
{
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
"ConditionAndCommandPairList": [
{
"Condition": {
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
"param": {
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
"ParamObject": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=message.MessageType"
}
"$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon",
"TryCommandPart": {
"CommandList": [
{
"$type": "JsonUtilityCommand.JsonDeserializeCommand, JsonUtilityCommand",
"JsonString": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.message"
},
"value": "2"
"SampleJson": "{\r\n \"Message\": \"新增WebHook的订阅\",\r\n \"MessageType\": 2,\r\n \"Modules\": [\r\n {\r\n \"State\": 3,\r\n \"Type\": 15,\r\n \"Name\": \"ServerCommand/创建一个仓库WebHook\"\r\n }\r\n ],\r\n \"Version\": \"v1\"\r\n}",
"ToParameter": "message"
},
"CommandList": [
{
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "Git_事件记录",
"UpdateType": "add",
"ShowConfirm": false,
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件名称",
"GUID": "efbbf095-19cd-4dae-92ec-a0f26a2efbcd"
},
"Value": "签入工程"
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "hook_id",
"GUID": "21366caf-c74c-4981-a013-6a7a67f6477d"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.hook_id"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件内容",
"GUID": "c854b847-0492-418f-b8ff-ec205e556c75"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=message.Message"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "空间路径",
"GUID": "4982e365-0843-42f7-aff4-1aff311903fd"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.namespace"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库名称",
"GUID": "c4d72e32-e0a7-4857-8cb1-df2f89597883"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.name"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库路径",
"GUID": "e12eb196-adc5-4aeb-95bc-c2f7d6eedbec"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.path"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "url",
"GUID": "4c3e3d4f-2dd9-4e3a-a49f-d90d31a16a7b"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.url"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "提交人",
"GUID": "347d5182-7b19-4a6f-8e5d-fc4612078592"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.committer.name"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "git用户名",
"GUID": "527d6e11-d777-454e-9677-3ec7fadb6a0f"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.committer.username"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库ID",
"GUID": "cf208007-6e12-4fd0-8cf5-fe0f4f1b3632"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.id"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "日期",
"GUID": "38c80d5e-0881-40ed-811f-d45eb2a521ce"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.committer.timestamp"
}
}
]
},
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "0",
"Message": "签入已被记录"
}
],
"ID": "b9cf1980-a636-4a10-a6f5-e53f0711f9db"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "今日记录",
"TableValue": {
"TableName": "Git_事件记录",
"TableValueType": 3,
"SqlCondition": {
"$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess",
"SubConditions": [
{
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库ID",
"GUID": "715f1edb-652c-46e3-b189-4c8bd44cf1d1"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.id"
}
},
{
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "git用户名",
"GUID": "4410e001-f94f-43ee-8ae0-b8a789a71786"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.committer.username"
}
},
{
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "FGC_CreateDate",
"GUID": "1f8b096d-adc6-4715-ab1e-2919781aca6b"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=TODAY()"
}
{
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
"ConditionAndCommandPairList": [
{
"Condition": {
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
"param": {
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
"ParamObject": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=message.MessageType"
}
]
}
},
"ID": "7a9485e728ea41d3b1481daa62b7036b",
"Disabled": true
},
{
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
"ConditionAndCommandPairList": [
{
"Condition": {
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
"param": {
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
"ParamObject": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=今日记录"
}
},
"value": "0"
},
"CommandList": [
{
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "Git_事件记录",
"UpdateType": "add",
"ShowConfirm": false,
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件名称",
"GUID": "0e6e01aa-5695-4e80-ac62-9e64cf34a86c"
},
"Value": "签出模块"
"value": "2"
},
"CommandList": [
{
"$type": "GETPOST.正则类.正则_校验, GETPOST",
"JieShouMsg": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=message.Message"
},
"JieShouMsg2": "^(.{0,3}|[^\\u4e00-\\u9fa5]*)$",
"FanHuiMsg": "内容有效性"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "内容得分",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=IF(内容有效性,0,LEN(message.Message))"
},
"ID": "7501e93f1fca4186be97273c76c90e00"
},
{
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "Git_事件记录",
"UpdateType": "add",
"ShowConfirm": false,
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件名称",
"GUID": "9afba933-59bd-417b-a5e6-d4784e58129b"
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "hook_id",
"GUID": "dcf94894-2c9e-418e-966c-4f1e23906f71"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.hook_id"
}
"Value": "签入工程"
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "hook_id",
"GUID": "ee135ea2-1c69-4319-b43e-d73a3030788c"
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件内容",
"GUID": "30f62c72-9b5b-468e-8913-dc78bfac2738"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=SUBSTITUTE(message.Message,\"签出模块 : \",\"\")"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "空间路径",
"GUID": "d97f0ab6-fad1-4d96-b62f-aa4f65cc42e4"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.namespace"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库名称",
"GUID": "15b9e3d3-cb05-475b-988f-e59667daa4c8"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.name"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库路径",
"GUID": "5dd5f4c1-9a4a-4308-a1d2-437ad831b120"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.path"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "url",
"GUID": "2f2a853b-0673-4a3b-b18c-d10b1ba53b40"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.url"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "提交人",
"GUID": "c0f7d5f9-d752-413e-b346-476b1c544f9d"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.committer.name"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "git用户名",
"GUID": "8c8e0a31-8990-4a0b-9b8c-94d084cb6681"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.committer.username"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库ID",
"GUID": "e71e0310-04a8-4a38-886d-c297c63044e1"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.id"
}
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.hook_id"
}
]
}
],
"ID": "12489899-d76f-4750-b786-fc6d7473bd14"
}
],
"Disabled": true
},
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "0",
"Message": "忽略非签入事件"
}
],
"ID": "2e4c36df-ab04-47b2-aa99-bb1085ff5228"
}
]
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件内容",
"GUID": "8c9d1dd9-5944-4b8a-a4ea-2c6dd0e9b07a"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=message.Message"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "空间路径",
"GUID": "4b6980cb-c9cd-47dd-8763-9fd15f428d39"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.namespace"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库名称",
"GUID": "28cc2340-020e-48ae-9706-50352688bfe0"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.name"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库路径",
"GUID": "ae427cf3-11ab-4792-970c-891778bb9814"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.path"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "url",
"GUID": "58dd6560-f46c-45ff-ab83-cade1f943f80"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.url"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "提交人",
"GUID": "5bc56c0b-134d-4773-97e2-9080b03fefb9"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.committer.name"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "git用户名",
"GUID": "73c38ad6-6238-44a8-8d27-3e8fe40ac0bd"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.committer.username"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库ID",
"GUID": "b7da3bc8-c9fe-4c9a-b4aa-27b09b8fa01f"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.id"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "日期",
"GUID": "9c5e506f-7326-47e9-bdec-73351267bcec"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.committer.timestamp"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "内容得分",
"GUID": "11ccd64d-5b65-41c4-8d9e-79ac19c3dce5"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=IF(内容得分>100,100,内容得分)"
}
}
]
},
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "0",
"Message": "签入已被记录"
}
],
"ID": "9e5fb441-085e-45ec-855d-67a76a9c166b"
}
]
}
]
}
}
],
"ID": "635f8496-5932-492c-80b8-2ac48a2a04a1"
"ID": "da7e3056-66c4-4dbe-a7bb-b022b5338fc5"
}
]
}