Files
clue/ServerCommands/Gitee/GitCallback.json

404 lines
30 KiB
JSON

{
"Name": "GitCallback",
"Enabled": true,
"Triggers": [
{
"$type": "Forguncy.SaveLoad.PostRequestTriggerSaveData, ServerDesignerCommon",
"Permission": {
"PermissionData": {
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionData, Forguncy.RbacPermission.Core",
"permissionResource": {
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionResource, Forguncy.RbacPermission.Core"
},
"permissionBindings": [
{
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionBinding, Forguncy.RbacPermission.Core",
"roleNames": [
"FGC_Anonymous"
]
}
]
}
}
}
],
"Commands": [
{
"$type": "SaveFormData.GetFormDataFiles, SaveFormData",
"ResultToReq": "请求信息"
},
{
"$type": "SaveFormData.fillInJSONProperties, SaveFormData",
"FullJsonString": "{\r\n \"ref\": \"refs/heads/版本10\",\r\n \"sign\": \"\",\r\n \"user\": {\r\n \"id\": 13097545,\r\n \"url\": \"https://gitee.com/tyfeikele\",\r\n \"name\": \"tyfeikele\",\r\n \"email\": \"tyfeikele@qq.com\",\r\n \"username\": \"tyfeikele\",\r\n \"user_name\": \"tyfeikele\"\r\n },\r\n \"after\": \"e74df3005e06241146220c1c78b746b1cb903e9d\",\r\n \"before\": \"bce508cc4c7574d8974a6e94a832c639ad07af99\",\r\n \"pusher\": {\r\n \"id\": 13097545,\r\n \"url\": \"https://gitee.com/tyfeikele\",\r\n \"name\": \"tyfeikele\",\r\n \"email\": \"tyfeikele@qq.com\",\r\n \"username\": \"tyfeikele\",\r\n \"user_name\": \"tyfeikele\"\r\n },\r\n \"sender\": {\r\n \"id\": 13097545,\r\n \"url\": \"https://gitee.com/tyfeikele\",\r\n \"name\": \"tyfeikele\",\r\n \"type\": \"User\",\r\n \"email\": \"tyfeikele@qq.com\",\r\n \"login\": \"tyfeikele\",\r\n \"remark\": null,\r\n \"html_url\": \"https://gitee.com/tyfeikele\",\r\n \"username\": \"tyfeikele\",\r\n \"user_name\": \"tyfeikele\",\r\n \"avatar_url\": \"https://foruda.gitee.com/avatar/1687145611305567010/13097545_tyfeikele_1687145611.png\",\r\n \"site_admin\": false\r\n },\r\n \"commits\": [\r\n {\r\n \"id\": \"e74df3005e06241146220c1c78b746b1cb903e9d\",\r\n \"url\": \"https://gitee.com/cuckooent/pms/commit/e74df3005e06241146220c1c78b746b1cb903e9d\",\r\n \"added\": [\r\n \r\n ],\r\n \"author\": {\r\n \"id\": null,\r\n \"url\": null,\r\n \"name\": \"HZG System\",\r\n \"time\": \"2024-06-18T09:38:19+08:00\",\r\n \"user\": null,\r\n \"email\": \"HZG System\",\r\n \"remark\": null,\r\n \"username\": null,\r\n \"user_name\": null\r\n },\r\n \"message\": \"{\\\"Message\\\":\\\"签出模块 : 后端新增项目反馈, 匿名提交项目反馈\\\",\\\"MessageType\\\":1,\\\"Modules\\\":[],\\\"Version\\\":\\\"v1\\\"}\\n\",\r\n \"removed\": [\r\n \r\n ],\r\n \"tree_id\": \"57f89455bbd615902d2a41732205a659beec7dc4\",\r\n \"distinct\": true,\r\n \"modified\": [\r\n \".collaboration\"\r\n ],\r\n \"committer\": {\r\n \"id\": null,\r\n \"url\": null,\r\n \"name\": \"HZG System\",\r\n \"time\": null,\r\n \"user\": null,\r\n \"email\": \"HZG System\",\r\n \"remark\": null,\r\n \"username\": null,\r\n \"user_name\": null\r\n },\r\n \"timestamp\": \"2024-06-18T09:38:19+08:00\",\r\n \"parent_ids\": [\r\n \"bce508cc4c7574d8974a6e94a832c639ad07af99\"\r\n ]\r\n }\r\n ],\r\n \"compare\": \"https://gitee.com/cuckooent/pms/compare/bce508cc4c7574d8974a6e94a832c639ad07af99...e74df3005e06241146220c1c78b746b1cb903e9d\",\r\n \"created\": false,\r\n \"deleted\": false,\r\n \"hook_id\": 1400568,\r\n \"project\": {\r\n \"id\": 33487312,\r\n \"url\": \"https://gitee.com/cuckooent/pms\",\r\n \"fork\": false,\r\n \"name\": \"PMS\",\r\n \"path\": \"pms\",\r\n \"owner\": {\r\n \"id\": 5267986,\r\n \"url\": \"https://gitee.com/cuckooent\",\r\n \"name\": \"超哥\",\r\n \"type\": \"User\",\r\n \"email\": \"phoben@qq.com\",\r\n \"login\": \"cuckooent\",\r\n \"remark\": null,\r\n \"html_url\": \"https://gitee.com/cuckooent\",\r\n \"username\": \"cuckooent\",\r\n \"user_name\": \"cuckooent\",\r\n \"avatar_url\": \"https://foruda.gitee.com/avatar/1677043949039184563/5267986_cuckooent_1646218684.png\",\r\n \"site_admin\": false\r\n },\r\n \"git_url\": \"git://gitee.com/cuckooent/pms.git\",\r\n \"license\": null,\r\n \"private\": true,\r\n \"ssh_url\": \"git@gitee.com:cuckooent/pms.git\",\r\n \"svn_url\": \"svn://gitee.com/cuckooent/pms\",\r\n \"has_wiki\": true,\r\n \"homepage\": null,\r\n \"html_url\": \"https://gitee.com/cuckooent/pms\",\r\n \"language\": \"C#\",\r\n \"clone_url\": \"https://gitee.com/cuckooent/pms.git\",\r\n \"full_name\": \"cuckooent/pms\",\r\n \"has_pages\": false,\r\n \"namespace\": \"cuckooent\",\r\n \"pushed_at\": \"2024-06-18T09:38:20+08:00\",\r\n \"created_at\": \"2024-02-29T22:11:29+08:00\",\r\n \"has_issues\": true,\r\n \"updated_at\": \"2024-06-18T09:38:20+08:00\",\r\n \"description\": \"新的PMS软件开发项目管理系统\",\r\n \"forks_count\": 0,\r\n \"git_ssh_url\": \"git@gitee.com:cuckooent/pms.git\",\r\n \"git_svn_url\": \"svn://gitee.com/cuckooent/pms\",\r\n \"git_http_url\": \"https://gitee.com/cuckooent/pms.git\",\r\n \"default_branch\": \"master\",\r\n \"watchers_count\": 3,\r\n \"stargazers_count\": 0,\r\n \"open_issues_count\": 0,\r\n \"name_with_namespace\": \"超哥/PMS\",\r\n \"path_with_namespace\": \"cuckooent/pms\"\r\n },\r\n \"user_id\": 13097545,\r\n \"hook_url\": \"https://gitee.com/cuckooent/pms/hooks/1400568/edit\",\r\n \"password\": \"6158891\",\r\n \"hook_name\": \"push_hooks\",\r\n \"push_data\": null,\r\n \"timestamp\": \"1718674701049\",\r\n \"user_name\": \"tyfeikele\",\r\n \"enterprise\": null,\r\n \"repository\": {\r\n \"id\": 33487312,\r\n \"url\": \"https://gitee.com/cuckooent/pms\",\r\n \"fork\": false,\r\n \"name\": \"PMS\",\r\n \"path\": \"pms\",\r\n \"owner\": {\r\n \"id\": 5267986,\r\n \"url\": \"https://gitee.com/cuckooent\",\r\n \"name\": \"超哥\",\r\n \"type\": \"User\",\r\n \"email\": \"phoben@qq.com\",\r\n \"login\": \"cuckooent\",\r\n \"remark\": null,\r\n \"html_url\": \"https://gitee.com/cuckooent\",\r\n \"username\": \"cuckooent\",\r\n \"user_name\": \"cuckooent\",\r\n \"avatar_url\": \"https://foruda.gitee.com/avatar/1677043949039184563/5267986_cuckooent_1646218684.png\",\r\n \"site_admin\": false\r\n },\r\n \"git_url\": \"git://gitee.com/cuckooent/pms.git\",\r\n \"license\": null,\r\n \"private\": true,\r\n \"ssh_url\": \"git@gitee.com:cuckooent/pms.git\",\r\n \"svn_url\": \"svn://gitee.com/cuckooent/pms\",\r\n \"has_wiki\": true,\r\n \"homepage\": null,\r\n \"html_url\": \"https://gitee.com/cuckooent/pms\",\r\n \"language\": \"C#\",\r\n \"clone_url\": \"https://gitee.com/cuckooent/pms.git\",\r\n \"full_name\": \"cuckooent/pms\",\r\n \"has_pages\": false,\r\n \"namespace\": \"cuckooent\",\r\n \"pushed_at\": \"2024-06-18T09:38:20+08:00\",\r\n \"created_at\": \"2024-02-29T22:11:29+08:00\",\r\n \"has_issues\": true,\r\n \"updated_at\": \"2024-06-18T09:38:20+08:00\",\r\n \"description\": \"新的PMS软件开发项目管理系统\",\r\n \"forks_count\": 0,\r\n \"git_ssh_url\": \"git@gitee.com:cuckooent/pms.git\",\r\n \"git_svn_url\": \"svn://gitee.com/cuckooent/pms\",\r\n \"git_http_url\": \"https://gitee.com/cuckooent/pms.git\",\r\n \"default_branch\": \"master\",\r\n \"watchers_count\": 3,\r\n \"stargazers_count\": 0,\r\n \"open_issues_count\": 0,\r\n \"name_with_namespace\": \"超哥/PMS\",\r\n \"path_with_namespace\": \"cuckooent/pms\"\r\n },\r\n \"user_email\": \"tyfeikele@qq.com\",\r\n \"head_commit\": {\r\n \"id\": \"e74df3005e06241146220c1c78b746b1cb903e9d\",\r\n \"url\": \"https://gitee.com/cuckooent/pms/commit/e74df3005e06241146220c1c78b746b1cb903e9d\",\r\n \"added\": [\r\n \r\n ],\r\n \"author\": {\r\n \"id\": null,\r\n \"url\": null,\r\n \"name\": \"HZG System\",\r\n \"time\": \"2024-06-18T09:38:19+08:00\",\r\n \"user\": null,\r\n \"email\": \"HZG System\",\r\n \"remark\": null,\r\n \"username\": null,\r\n \"user_name\": null\r\n },\r\n \"message\": \"{\\\"Message\\\":\\\"签出模块 : 后端新增项目反馈, 匿名提交项目反馈\\\",\\\"MessageType\\\":1,\\\"Modules\\\":[],\\\"Version\\\":\\\"v1\\\"}\\n\",\r\n \"removed\": [\r\n \r\n ],\r\n \"tree_id\": \"57f89455bbd615902d2a41732205a659beec7dc4\",\r\n \"distinct\": true,\r\n \"modified\": [\r\n \".collaboration\"\r\n ],\r\n \"committer\": {\r\n \"id\": null,\r\n \"url\": null,\r\n \"name\": \"HZG System\",\r\n \"time\": null,\r\n \"user\": null,\r\n \"email\": \"HZG System\",\r\n \"remark\": null,\r\n \"username\": null,\r\n \"user_name\": null\r\n },\r\n \"timestamp\": \"2024-06-18T09:38:19+08:00\",\r\n \"parent_ids\": [\r\n \"bce508cc4c7574d8974a6e94a832c639ad07af99\"\r\n ]\r\n },\r\n \"total_commits_count\": 1,\r\n \"commits_more_than_ten\": false\r\n }",
"SourceJson": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=请求信息.Body"
},
"ResultTo": "钩子数据"
},
{
"$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": "=钩子数据.hook_name"
}
},
"value": "push_hooks"
},
"CommandList": [
{
"$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon",
"TryCommandPart": {
"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"
}
},
"value": "2"
},
"CommandList": [
{
"$type": "CollectionOperationKit.ServerSideArrayOp, CollectionOperationKit",
"Operation": 17,
"OperationParamaterAName": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.ref"
},
"OperationParamaterBName": "/",
"OutParamaterName": "ref"
},
{
"$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(内容有效性,-1,IF(LEN(message.Message)<4,0,LEN(message.Message)))"
},
"ID": "613428f86fac4f55adaeea6a94291b96"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "内容得分",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=IF(内容得分>100,100,内容得分)"
},
"ID": "2ad2df5fcbb54f149af83f3f427a79d4"
},
{
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "Git_事件记录",
"UpdateType": "add",
"ShowConfirm": false,
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件名称",
"GUID": "e60add02-7791-4921-8bb0-ef781cad2816"
},
"Value": "签入工程"
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "hook_id",
"GUID": "9d754095-ae26-4d83-b41d-56c0a4e51f72"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.hook_id"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件内容",
"GUID": "0df12638-a44a-4e54-a149-685208fbec15"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=message.Message"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "空间路径",
"GUID": "842fb0df-848e-4a6c-86f4-e61e557c38d0"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.namespace"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库名称",
"GUID": "194fe915-1f6a-4cb3-9e2a-88eda23988b7"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.name"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库路径",
"GUID": "e485c67f-c356-4656-a362-d2b71c9cb9cf"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.path"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "url",
"GUID": "49d7ec12-e0d1-4479-8313-bcd1dd0c9522"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.url"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "提交人",
"GUID": "cd81a889-c377-4689-9123-4192be490576"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.pusher.name"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "git用户名",
"GUID": "776fe34d-747f-40f6-bfec-82cb19e7a9be"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.pusher.username"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库ID",
"GUID": "f351ec11-8b0e-4c23-9dac-7adc9ee2fd13"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.id"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "日期",
"GUID": "196e71cf-c978-412f-97fc-0885db5c096c"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.timestamp"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "内容得分",
"GUID": "0da58e1a-3811-4e5d-829e-9a33d70ed44f"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=内容得分"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "sha",
"GUID": "8ca0f22b-a77c-467f-8432-95c86fc632a2"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.after"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "分支",
"GUID": "5d86ada4-6f89-4184-a276-7a245314737e"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=ref.2"
}
}
]
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "用户",
"TableValue": {
"TableName": "用户信息视图",
"TableValueType": 1,
"BindingInfos": [
{
"GUID": "85ebcff8-97d6-41c0-85e8-fffcef940c40",
"BindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "用户名",
"GUID": "664ac1a2-90a4-4c4b-bf52-4b363e8b2e56"
},
"ColumnName": "用户名"
}
],
"SqlCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "GIT用户名",
"GUID": "198d8a88-c702-41b2-bcd9-c520f2198faf"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.pusher.username"
}
},
"NullFormulaValueQueryPolicy": 0,
"TopCount": "1"
},
"ID": "3bce84654ac34772b4c9c89f1d9f5f45"
},
{
"$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.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "积分记录表",
"UpdateType": "add",
"ShowConfirm": false,
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "积分记录表",
"ColumnName": "用户",
"GUID": "b87a6c21-1585-4cbe-9d64-89447ca3e27e"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=用户.用户名"
}
},
{
"BindingInfo": {
"TableName": "积分记录表",
"ColumnName": "类型",
"GUID": "8ca8d05c-c01d-4bc7-99fb-4fde28bd3107"
},
"Value": "GitPush"
},
{
"BindingInfo": {
"TableName": "积分记录表",
"ColumnName": "分数",
"GUID": "5f996181-0da0-4841-a4ba-d813fcec56cd"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=内容得分"
}
},
{
"BindingInfo": {
"TableName": "积分记录表",
"ColumnName": "变动日期",
"GUID": "298f930f-0bc7-4a47-8a9d-597c150f993e"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=NOW()"
}
}
]
}
],
"ID": "00957153-1cf3-4979-af7f-279bd6af10c1"
}
]
},
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "0",
"Message": "签入已被记录"
}
],
"ID": "b506f309-6e76-4915-af68-cf8fb7df29d7"
}
]
}
]
}
}
],
"ID": "d69ca17f-2618-438e-8a75-4cf004866ad6"
}
]
}
]
}