{ "Name": "删除一个仓库WebHook", "Enabled": true, "Triggers": [ { "$type": "Forguncy.SaveLoad.InvokeTriggerSaveData, ServerDesignerCommon", "Parameters": [ { "Name": "仓库ID", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "gyrnccc" }, { "Name": "用户名", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "Administrator" }, { "Name": "清空钩子", "DataValidationInfo": {} } ], "InvokeTriggerTestData": { "UserName": "Administrator" } } ], "Commands": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "仓库", "TableValue": { "TableName": "Git仓库表", "TableValueType": 1, "BindingInfos": [ { "GUID": "0f5789c1-7d47-4c09-8653-74a57374d6c6", "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间路径名", "GUID": "a01c203a-e4df-4196-b987-949bb9e2bdf9" }, "ColumnName": "空间路径名" }, { "GUID": "8dc4402a-90d4-4e1b-98c6-7b53573085c2", "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库路径名", "GUID": "f0989a4d-ce36-4869-b70a-3d3a7ef5f711" }, "ColumnName": "仓库路径名" }, { "GUID": "994df018-43ca-4427-98a9-3e3e0bde686c", "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "Callback_url", "GUID": "7593214d-3ac3-4f31-8e29-e4230cf2b96a" }, "ColumnName": "hook_url" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库ID", "GUID": "856ed04e-a1ca-466b-a6dd-7e36934e1b6a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "203a79b333264e53af68232a742b899f" }, { "$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": "%Null%", "compareType": 1 }, "CommandList": [ { "$type": "Forguncy.Model.RequestServerCommand, ServerDesignerCommon", "ServerCommandName": "列出仓库的WebHooks", "Parameters": [ { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "仓库ID", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库ID" } }, { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "用户名", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户名" } } ], "ResultErrorCodeTo": { "SerializeProperty": "code" }, "ResultMessageTo": { "SerializeProperty": "msg" }, "ReturnPropertiesTo": [ { "ResultPropertyName": "钩子列表", "ResultTo": { "SerializeProperty": "钩子列表" } }, { "ResultPropertyName": "ACCESS_TOKEN", "ResultTo": { "SerializeProperty": "ACCESS_TOKEN" } } ], "RefreshAfterFinish": true, "CheckDataValidation": 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": "=code" } }, "value": "0" }, "CommandList": [ { "$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=钩子列表" }, "LoopItemParamName": "Item" }, "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": [ { "$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": "=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" } } ] } } ], "ID": "035835d7-f6e7-427e-a1d5-5908f7839a9d" } ] } ] }, { "$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" } }, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "订阅成功", "GUID": "eac7cb09-049a-4f2f-89ec-a6676767f5a2" }, "Value": "0" } ] } ], "ID": "096965ab-99e0-45ab-ae27-fa6c7783bd79" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=code" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=msg" } } ], "ID": "8f0c41d9-1e33-41ce-b3de-14694861b5a4" } ] } ], "ID": "584c3d0c-dc78-4d8e-81f9-0478dcb4ce3b" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "仓库不存在!" } ], "ID": "433f6e82-7a58-495a-8145-97e68592c45d" } ] } ] }