Files
clue/ServerCommands/Gitee/GitCallback.json

290 lines
23 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(内容有效性,0,LEN(message.Message))"
},
"ID": "185837ec261e4cd899d04cad3f26b2e1"
},
{
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "Git_事件记录",
"UpdateType": "add",
"ShowConfirm": false,
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件名称",
"GUID": "d11e5d0f-25e1-443d-b8ad-492b1808c81d"
},
"Value": "签入工程"
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "hook_id",
"GUID": "caff9319-64eb-4276-8168-8f8c286d5684"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.hook_id"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件内容",
"GUID": "11f04fb1-57d7-492b-acb6-e99fabb249a8"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=message.Message"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "空间路径",
"GUID": "7ad7226d-893c-4557-bd9e-dee2d0129041"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.namespace"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库名称",
"GUID": "a377a58e-15fb-4094-ade9-a55dfe500e68"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.name"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库路径",
"GUID": "3d216989-8a10-4a4e-8ea2-eb785966bcac"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.path"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "url",
"GUID": "6678b805-6437-49ad-9da1-9b0de77ebdc8"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.url"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "提交人",
"GUID": "de862070-67db-4aa1-a3ab-3879924702f8"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.pusher.tyfeikele"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "git用户名",
"GUID": "c7911bce-2a61-4724-b8ef-6eefa0606ffc"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.pusher.username"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库ID",
"GUID": "85b7bd3b-8e17-421b-ab49-bf67e4db45c0"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.id"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "日期",
"GUID": "d1f440b2-6191-45da-bed1-a5bda92796cf"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.timestamp"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "内容得分",
"GUID": "34080b86-dc4f-49e8-b1a9-bdceb4258c6c"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=IF(内容得分>100,100,内容得分)"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "sha",
"GUID": "2bad1d08-99a9-4b02-921a-3dbae28e4cbc"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.after"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "分支",
"GUID": "14c04561-e090-4e3a-a6a2-9ad2fde120e0"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=ref.2"
}
}
]
},
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "0",
"Message": "签入已被记录"
}
],
"ID": "e0873df2-056b-45c2-8395-151ba6500766"
}
]
}
]
}
}
],
"ID": "c447f209-f783-400e-ad2a-985820fd18a9"
}
]
}
]
}