Files
clue/ServerCommands/Gitee/列出仓库的WebHooks.json

354 lines
14 KiB
JSON

{
"Name": "列出仓库的WebHooks",
"Enabled": true,
"Triggers": [
{
"$type": "Forguncy.SaveLoad.InvokeTriggerSaveData, ServerDesignerCommon",
"Parameters": [
{
"Name": "仓库ID",
"DataValidationInfo": {
"IgnoreBlank": false
},
"TestData": "33487312"
},
{
"Name": "用户名",
"DataValidationInfo": {
"IgnoreBlank": false
},
"TestData": "Administrator"
}
],
"InvokeTriggerTestData": {
"UserName": "Administrator"
}
}
],
"Commands": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "当前用户",
"TableValue": {
"TableName": "用户信息视图",
"TableValueType": 1,
"BindingInfos": [
{
"GUID": "c6eb66bd-c1e2-4bf4-ad2d-549a68fb23f2",
"BindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "GIT用户名",
"GUID": "68ee86fa-88ce-4787-9175-7fb4b1f4639f"
},
"ColumnName": "GIT用户名"
},
{
"GUID": "30c3f423-ad80-474d-ae90-2e7dc076bddb",
"BindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "GIT密码",
"GUID": "4ca2adb0-be71-4cff-a7f0-0f319f33fc35"
},
"ColumnName": "GIT密码"
}
],
"SqlCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "用户名",
"GUID": "e3ee2272-9867-43eb-97ee-199cb94862de"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=用户名"
}
},
"NullFormulaValueQueryPolicy": 0,
"TopCount": "1"
},
"ID": "22c08c26600240308f2761ba08d0b396"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "仓库",
"TableValue": {
"TableName": "Git仓库表",
"TableValueType": 1,
"BindingInfos": [
{
"GUID": "eab47598-bcd0-4b61-ab21-f4499617214f",
"BindingInfo": {
"TableName": "Git仓库表",
"ColumnName": "仓库路径名",
"GUID": "2c41e2fb-0784-4414-a2f6-e7bf48e1a825"
},
"ColumnName": "仓库路径名"
},
{
"GUID": "72c9972f-e241-4bc7-8414-58a9ecdcd638",
"BindingInfo": {
"TableName": "Git仓库表",
"ColumnName": "空间路径名",
"GUID": "a4dc7e40-113c-4634-a254-bd3d364169e2"
},
"ColumnName": "空间路径名"
}
],
"SqlCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git仓库表",
"ColumnName": "仓库ID",
"GUID": "7aa0116e-f6a8-4a54-9dc1-10755107fdf9"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=仓库ID"
}
},
"NullFormulaValueQueryPolicy": 0,
"TopCount": "1"
},
"ID": "a2fa9d23eaeb4e18ba0abc7c6ba18b88"
},
{
"$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": "请求令牌",
"Parameters": [
{
"$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon",
"ParamName": "用户名",
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=用户名"
}
},
{
"$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon",
"ParamName": "强制刷新",
"Value": "0"
}
],
"ResultErrorCodeTo": {
"SerializeProperty": "code"
},
"ResultMessageTo": {
"SerializeProperty": "msg"
},
"ReturnPropertiesTo": [
{
"ResultPropertyName": "最新令牌",
"ResultTo": {
"SerializeProperty": "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.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "url",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=\"https://gitee.com/api/v5/repos/\"&仓库.空间路径名&\"/\"&仓库.仓库路径名&\"/hooks\""
},
"ID": "fbb123be017a4289846192ec2842aebb"
},
{
"$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": "=TOKEN"
}
},
{
"Name": "page",
"DataItemType": 0,
"Data": 1
},
{
"Name": "per_page",
"DataItemType": 0,
"Data": 100
}
]
}
},
"JsonString": "",
"WebUrl": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=url"
},
"Method": "GET",
"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": "完成",
"CustomReturns": [
{
"ReturnPropertyName": "钩子列表",
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=result"
}
},
{
"ReturnPropertyName": "ACCESS_TOKEN",
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=TOKEN"
}
}
]
}
]
},
"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"
},
"CustomReturns": [
{
"ReturnPropertyName": "钩子列表"
},
{
"ReturnPropertyName": "ACCESS_TOKEN",
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=TOKEN"
}
}
]
}
]
}
}
],
"ID": "f727fc1a-5bda-49c8-a1c1-b54e23d0d412"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=code"
},
"Message": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=msg"
},
"CustomReturns": [
{
"ReturnPropertyName": "钩子列表"
},
{
"ReturnPropertyName": "ACCESS_TOKEN"
}
]
}
],
"ID": "4fde08ac-6a64-4142-bf48-755405561889"
}
]
}
],
"ID": "d3cb6dd1-113a-45ea-877e-0437029ad157"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": "仓库不存在,请先同步仓库到系统中",
"CustomReturns": [
{
"ReturnPropertyName": "钩子列表"
},
{
"ReturnPropertyName": "ACCESS_TOKEN"
}
]
}
],
"ID": "820d4a45-8033-4364-b172-008343f6154b"
}
]
}
],
"ReturnProperties": [
{
"Name": "钩子列表"
},
{
"Name": "ACCESS_TOKEN"
}
]
}