{"Message":"新增WebHook的订阅","MessageType":2,"Modules":[{"State":1,"Type":7,"Name":"Table/FGC_订单记录","ExclusiveType":0},{"State":1,"Type":7,"Name":"Table/FGC_订单明细表","ExclusiveType":0},{"State":1,"Type":7,"Name":"Table/FGC_商品表","ExclusiveType":0},{"State":1,"Type":7,"Name":"Table/项目动态"},{"State":1,"Type":7,"Name":"Table/项目版本"},{"State":1,"Type":23,"Name":"TableView/用户信息视图","ExclusiveType":0},{"State":1,"Type":23,"Name":"TableView/用户组织关系视图","ExclusiveType":0},{"State":1,"Type":23,"Name":"TableView/用户角色关系视图","ExclusiveType":0},{"State":1,"Type":23,"Name":"TableView/组织信息视图","ExclusiveType":0},{"State":1,"Type":23,"Name":"TableView/组织级别视图","ExclusiveType":0},{"State":1,"Type":23,"Name":"TableView/角色信息视图","ExclusiveType":0},{"State":1,"Type":23,"Name":"TableView/角色分类关系视图","ExclusiveType":0},{"State":1,"Type":23,"Name":"TableView/角色拥有权限视图","ExclusiveType":0},{"State":1,"Type":23,"Name":"TableView/角色组织关系视图","ExclusiveType":0},{"State":1,"Type":7,"Name":"Table/message_test","ExclusiveType":0},{"State":1,"Type":1,"Name":"PCPage/项目版本管理"},{"State":1,"Type":1,"Name":"PCPage/任务版本详情"},{"State":1,"Type":1,"Name":"PCPage/任务-任务信息"},{"State":1,"Type":1,"Name":"PCPage/新增任务"},{"State":1,"Type":1,"Name":"PCPage/工时总览"},{"State":1,"Type":1,"Name":"PCPage/个人工时首页"},{"State":1,"Type":1,"Name":"PCPage/首页"},{"State":1,"Type":3,"Name":"MasterPCPage/FGC_母版页"},{"State":1,"Type":15,"Name":"ServerCommand/AI报工数据转日报"},{"State":1,"Type":8,"Name":"ApplicationSetting"},{"State":1,"Type":12,"Name":"CustomLibrary"},{"State":1,"Type":26,"Name":"Upload"},{"State":1,"Type":39,"Name":"PublishConfiguration"},{"State":1,"Type":40,"Name":"Plugin"},{"State":1,"Type":27,"Name":"ServerCommandPrivate/请求令牌"},{"State":2,"Type":27,"Name":"ServerCommandPrivate/创建一个仓库WebHook"},{"State":1,"Type":27,"Name":"ServerCommandPrivate/删除一个仓库WebHook"},{"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":15,"Name":"ServerCommand/搜索仓库"},{"State":3,"Type":27,"Name":"ServerCommandPrivate/列出仓库的WebHooks"},{"State":3,"Type":16,"Name":"TaskScheduler/应用部署时"},{"State":3,"Type":20,"Name":"ServerCommands/系统"},{"State":3,"Type":15,"Name":"ServerCommand/获取版本号"},{"State":3,"Type":15,"Name":"ServerCommand/列出授权用户所有的Namespace"},{"State":3,"Type":15,"Name":"ServerCommand/创建一个仓库WebHook"}],"Version":"v1"}

This commit is contained in:
超哥
2024-06-13 19:51:48 +08:00
parent b8f39fbefc
commit 658b5c7f8f
35 changed files with 2989 additions and 3212 deletions

View File

@@ -6,21 +6,22 @@
"$type": "Forguncy.SaveLoad.InvokeTriggerSaveData, ServerDesignerCommon",
"Parameters": [
{
"Name": "WebHookId",
"Name": "仓库ID",
"DataValidationInfo": {
"IgnoreBlank": false
},
"TestData": "1400424"
},
{
"Name": "仓库路径名",
"DataValidationInfo": {},
"TestData": "gyrnccc"
},
{
"Name": "用户名",
"DataValidationInfo": {},
"DataValidationInfo": {
"IgnoreBlank": false
},
"TestData": "Administrator"
},
{
"Name": "清空钩子",
"DataValidationInfo": {}
}
],
"InvokeTriggerTestData": {
@@ -31,55 +32,55 @@
"Commands": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "当前用户",
"ParameterName": "仓库",
"TableValue": {
"TableName": "用户信息视图",
"TableName": "Git仓库表",
"TableValueType": 1,
"BindingInfos": [
{
"GUID": "78cb510b-3b08-4fee-8df4-b581cd73fcee",
"GUID": "6984ed49-645c-4768-a88a-0edc4f34c65c",
"BindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "GIT用户名",
"GUID": "b6e5b969-da71-4371-9a85-218e9a38c3ab"
"TableName": "Git仓库表",
"ColumnName": "空间路径名",
"GUID": "a01c203a-e4df-4196-b987-949bb9e2bdf9"
},
"ColumnName": "GIT用户名"
"ColumnName": "空间路径名"
},
{
"GUID": "57b469ca-2dca-400b-9537-af32029ab64f",
"GUID": "27c330a3-65da-4a14-9f71-81aebbc73575",
"BindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "GIT密码",
"GUID": "482c4996-4547-4c68-a398-80eb4563b998"
"TableName": "Git仓库表",
"ColumnName": "仓库路径名",
"GUID": "f0989a4d-ce36-4869-b70a-3d3a7ef5f711"
},
"ColumnName": "GIT密码"
"ColumnName": "仓库路径名"
},
{
"GUID": "bd5c6119-0f98-41ae-a979-aa49b426d2bf",
"BindingInfo": {
"TableName": "Git仓库表",
"ColumnName": "hook_url",
"GUID": "7593214d-3ac3-4f31-8e29-e4230cf2b96a"
},
"ColumnName": "hook_url"
}
],
"SqlCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "用户名",
"GUID": "8ed9cbb6-76b8-463e-aef4-7585445b3303"
"TableName": "Git仓库表",
"ColumnName": "仓库ID",
"GUID": "856ed04e-a1ca-466b-a6dd-7e36934e1b6a"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=用户名"
"SerializeProperty": "=仓库ID"
}
},
"NullFormulaValueQueryPolicy": 0,
"TopCount": "1"
},
"ID": "50f64a7ee8764989ba838ab9701f5ce3"
},
{
"$type": "JsonUtilityCommand.JsonDeserializeCommand, JsonUtilityCommand",
"JsonString": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=全局_Gitee"
},
"SampleJson": "{\r\n \"enterprise\": \"GridStudio\",\r\n \"client_id\": \"c7d05fcbaf78ad728fcc0267d081ae6c50dc667667758a0933525d4cbe09ed90\",\r\n \"client_secret\": \"b4d40db2155ca530e5771b37a2fb67161d4106c64df28f32504b4e3bcfb81313\"\r\n}",
"ToParameter": "Gitee"
"ID": "69431f6041fc4cd9b99b4d2e12383acf"
},
{
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
@@ -91,7 +92,7 @@
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
"ParamObject": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=Gitee.enterprise"
"SerializeProperty": "=仓库"
}
},
"value": "%Null%",
@@ -100,8 +101,16 @@
"CommandList": [
{
"$type": "Forguncy.Model.RequestServerCommand, ServerDesignerCommon",
"ServerCommandName": "请求令牌",
"ServerCommandName": "列出仓库的WebHooks",
"Parameters": [
{
"$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon",
"ParamName": "仓库ID",
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=仓库ID"
}
},
{
"$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon",
"ParamName": "用户名",
@@ -109,11 +118,6 @@
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=用户名"
}
},
{
"$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon",
"ParamName": "强制刷新",
"Value": "0"
}
],
"ResultErrorCodeTo": {
@@ -124,9 +128,15 @@
},
"ReturnPropertiesTo": [
{
"ResultPropertyName": "最新令牌",
"ResultPropertyName": "钩子列表",
"ResultTo": {
"SerializeProperty": "TOKEN"
"SerializeProperty": "钩子列表"
}
},
{
"ResultPropertyName": "ACCESS_TOKEN",
"ResultTo": {
"SerializeProperty": "ACCESS_TOKEN"
}
}
],
@@ -150,114 +160,161 @@
},
"CommandList": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "url",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=\"https://gitee.com/api/v5/repos/\"&Gitee.enterprise&\"/\"&仓库路径名&\"/hooks/\"&WebHookId"
"$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon",
"LoopInfo": {
"$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon",
"LoopCount": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子列表"
},
"LoopItemParamName": "Item"
},
"ID": "020374fd3ba147899767312a664c7c2e"
},
{
"$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon",
"TryCommandPart": {
"CommandList": [
{
"$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon",
"CommandList": [
{
"$type": "PostDataToWebApi.PostDataCommand, PostDataToWebApi",
"PostData": {
"DataItemType": 1,
"Data": {
"$type": "PostDataToWebApi.ObjectData, PostDataToWebApi",
"Data": [
"CommandList": [
{
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
"ConditionAndCommandPairList": [
{
"Condition": {
"$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess",
"SubConditions": [
{
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
"param": {
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
"ParamObject": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=Item.url"
}
},
"value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=仓库.hook_url"
}
},
{
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
"param": {
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
"ParamObject": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=清空钩子"
}
},
"value": "1"
}
],
"RelationType": 1
},
"CommandList": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "url",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=\"https://gitee.com/api/v5/repos/\"&仓库.空间路径名&\"/\"&仓库.仓库路径名&\"/hooks/\"&WebHookId"
},
"ID": "0cc504bc6d7044118b6022cea324f20f"
},
{
"$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon",
"TryCommandPart": {
"CommandList": [
{
"Name": "access_token",
"DataItemType": 0,
"Data": {
"$type": "PostDataToWebApi.PostDataCommand, PostDataToWebApi",
"PostData": {
"DataItemType": 1,
"Data": {
"$type": "PostDataToWebApi.ObjectData, PostDataToWebApi",
"Data": [
{
"Name": "access_token",
"DataItemType": 0,
"Data": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=ACCESS_TOKEN"
}
}
]
}
},
"JsonString": "",
"WebUrl": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=TOKEN"
"SerializeProperty": "=url"
},
"Method": "DELETE",
"SuccessCallback": "// 请求成功返回的数据存储在“result”变量中\r\n// 请使用“result”变量来完成请求成功的回调 \r\n//console.log(result);",
"ErrorCallback": "// 请求中发生的错误存储在“error”变量中\r\n// 请使用“error”变量来处理异常情况 \r\nconsole.error(error);",
"NewParameter": "result",
"Header": [],
"Timeout": 100.0
},
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "0",
"Message": "删除成功"
}
]
},
"CatchCommandPart": {
"CommandList": [
{
"$type": "JsonUtilityCommand.JsonDeserializeCommand, JsonUtilityCommand",
"JsonString": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=ExceptionMessage"
},
"SampleJson": "{\"message\":\"\"}",
"ToParameter": "错误信息"
},
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=错误信息.message"
}
}
]
}
},
"JsonString": "",
"WebUrl": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=url"
},
"Method": "DELETE",
"SuccessCallback": "// 请求成功返回的数据存储在“result”变量中\r\n// 请使用“result”变量来完成请求成功的回调 \r\n//console.log(result);",
"ErrorCallback": "// 请求中发生的错误存储在“error”变量中\r\n// 请使用“error”变量来处理异常情况 \r\nconsole.error(error);",
"NewParameter": "result",
"Header": [],
"Timeout": 100.0
},
{
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "Git_WebHook",
"UpdateType": "delete",
"ShowConfirm": true,
"ConfirmText": "您确定要删除吗?",
"RowsToUpdate": 1,
"RowsToUpdateCondition": {
"$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess",
"SubConditions": [
{
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git_WebHook",
"ColumnName": "hook_id",
"GUID": "ac7a5b01-c68a-4321-b177-a3e2a9347c46"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=WebHookId"
}
},
{
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git_WebHook",
"ColumnName": "仓库ID",
"GUID": "63ba95bb-2258-4f7e-a0c3-fd2c9a82c989",
"RelationBinding": {
"RelatedTable": "Git仓库表",
"RelatedColumn": "仓库ID",
"DisplayColumn": "仓库路径名"
}
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=仓库路径名"
}
}
]
}
}
]
},
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "0",
"Message": "删除成功"
}
]
],
"ID": "7bf94930-152d-4ad0-b0ed-06d9cf242245"
}
]
}
]
},
{
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "Git仓库表",
"ShowConfirm": false,
"RowsToUpdate": 1,
"RowsToUpdateCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git仓库表",
"ColumnName": "ID",
"GUID": "f371a6e5-d82e-455a-a0ab-49d2edaa505a"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=仓库ID"
}
},
"CatchCommandPart": {
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": "删除失败"
}
]
}
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "Git仓库表",
"ColumnName": "订阅成功",
"GUID": "eac7cb09-049a-4f2f-89ec-a6676767f5a2"
},
"Value": "0"
}
]
}
],
"ID": "452284ba-2452-4c0b-a055-d020ad61f420"
"ID": "bfa84f55-a5a7-4e19-8ef6-7bcbd8149d2b"
},
{
"CommandList": [
@@ -273,22 +330,22 @@
}
}
],
"ID": "68f5ba75-4d15-4baf-9ee9-595e5c1815f0"
"ID": "49a69f53-dc13-4115-8f1e-fba2282b4880"
}
]
}
],
"ID": "0d3cb56e-14ec-420c-82f9-995d7b5a1a48"
"ID": "a9e37a05-1a06-4e28-be3c-79ac1f77bf06"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": "请先配置全局Gitee企业路径名"
"Message": "仓库不存在!"
}
],
"ID": "abca0571-92c2-428d-870c-f50a45319d21"
"ID": "f69ab340-65a3-43d5-95c6-64efefd84138"
}
]
}