407 lines
25 KiB
JSON
407 lines
25 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 \"hook_name\": \"push_hooks\", \r\n \"password\": \"pwd\",\r\n \"hook_id\": 1,\r\n \"hook_url\": \"http://gitee.com/liwen/gitos/hooks/1/edit\",\r\n \"timestamp\": \"1576754827988\",\r\n \"sign\": \"rLEHLuZRIQHuTPeXMib9Czoq9dVXO4TsQcmQQHtjXHA=\",\r\n \"ref\": \"refs/heads/change_commitlint_config\",\r\n \"before\": \"0000000000000000000000000000000000000000\",\r\n \"after\": \"1cdcd819599cbb4099289dbbec762452f006cb40\",\r\n \"created\": true,\r\n \"deleted\": false,\r\n \"compare\": \"https://gitee.com/oschina/gitee/compare/0000000000000000000000000000000000000000...1cdcd819599cbb4099289dbbec762452f006cb40\",\r\n \"commits\": [\r\n {\r\n \"id\": \"1cdcd819599cbb4099289dbbec762452f006cb40\",\r\n \"tree_id\": \"db78f3594ec0683f5d857ef731df0d860f14f2b2\",\r\n \"distinct\": true,\r\n \"message\": \"Update README.md\",\r\n \"timestamp\": \"2018-02-05T23:46:46+08:00\",\r\n \"url\": \"https://gitee.com/oschina/gitee/commit/1cdcd819599cbb4099289dbbec762452f006cb40\",\r\n \"author\": {\r\n \"time\": \"2018-02-05T23:46:46+08:00\",\r\n \"name\": \"robot\",\r\n \"email\": \"robot@gitee.com\",\r\n \"username\": \"robot\",\r\n \"user_name\": \"robot\",\r\n \"url\": \"https://gitee.com/robot\"\r\n },\r\n \"committer\": {\r\n \"name\": \"robot\",\r\n \"email\": \"robot@gitee.com\",\r\n \"username\": \"robot\",\r\n \"user_name\": \"robot\",\r\n \"url\": \"https://gitee.com/robot\"\r\n },\r\n \"added\": null,\r\n \"removed\": null,\r\n \"modified\": [\r\n \"README.md\"\r\n ]\r\n }\r\n ],\r\n \"head_commit\": {\r\n \"id\": \"1cdcd819599cbb4099289dbbec762452f006cb40\",\r\n \"tree_id\": \"db78f3594ec0683f5d857ef731df0d860f14f2b2\",\r\n \"distinct\": true,\r\n \"message\": \"Update README.md\",\r\n \"timestamp\": \"2018-02-05T23:46:46+08:00\",\r\n \"url\": \"https://gitee.com/oschina/gitee/commit/1cdcd819599cbb4099289dbbec762452f006cb40\",\r\n \"author\": {\r\n \"time\": \"2018-02-05T23:46:46+08:00\",\r\n \"name\": \"robot\",\r\n \"email\": \"robot@gitee.com\",\r\n \"username\": \"robot\",\r\n \"user_name\": \"robot\",\r\n \"url\": \"https://gitee.com/robot\"\r\n },\r\n \"committer\": {\r\n \"name\": \"robot\",\r\n \"email\": \"robot@gitee.com\",\r\n \"username\": \"robot\",\r\n \"user_name\": \"robot\",\r\n \"url\": \"https://gitee.com/robot\"\r\n },\r\n \"added\": null,\r\n \"removed\": null,\r\n \"modified\": [\r\n \"README.md\"\r\n ]\r\n },\r\n \"total_commits_count\": 0,\r\n \"commits_more_than_ten\": false,\r\n \"repository\": {\r\n \"id\": 120249025,\r\n \"name\": \"Gitee\",\r\n \"path\": \"gitee\",\r\n \"full_name\": \"开源中国/Gitee\",\r\n \"owner\": {\r\n \"id\": 1,\r\n \"login\": \"robot\",\r\n \"avatar_url\": \"https://gitee.com/assets/favicon.ico\",\r\n \"html_url\": \"https://gitee.com/robot\",\r\n \"type\": \"User\",\r\n \"site_admin\": false,\r\n \"name\": \"robot\",\r\n \"email\": \"robot@gitee.com\",\r\n \"username\": \"robot\",\r\n \"user_name\": \"robot\",\r\n \"url\": \"https://gitee.com/robot\"\r\n },\r\n \"private\": false,\r\n \"html_url\": \"https://gitee.com/oschina/gitee\",\r\n \"url\": \"https://gitee.com/oschina/gitee\",\r\n \"description\": \"\",\r\n \"fork\": false,\r\n \"created_at\": \"2018-02-05T23:46:46+08:00\",\r\n \"updated_at\": \"2018-02-05T23:46:46+08:00\",\r\n \"pushed_at\": \"2018-02-05T23:46:46+08:00\",\r\n \"git_url\": \"git://gitee.com:oschina/gitee.git\",\r\n \"ssh_url\": \"git@gitee.com:oschina/gitee.git\",\r\n \"clone_url\": \"https://gitee.com/oschina/gitee.git\",\r\n \"svn_url\": \"svn://gitee.com/oschina/gitee\",\r\n \"git_http_url\": \"https://gitee.com/oschina/gitee.git\",\r\n \"git_ssh_url\": \"git@gitee.com:oschina/gitee.git\",\r\n \"git_svn_url\": \"svn://gitee.com/oschina/gitee\",\r\n \"homepage\": null,\r\n \"stargazers_count\": 11,\r\n \"watchers_count\": 12,\r\n \"forks_count\": 0,\r\n \"language\": \"ruby\",\r\n \"has_issues\": true,\r\n \"has_wiki\": true,\r\n \"has_pages\": false,\r\n \"license\": null,\r\n \"open_issues_count\": 0,\r\n \"default_branch\": \"master\",\r\n \"namespace\": \"oschina\",\r\n \"name_with_namespace\": \"开源中国/Gitee\",\r\n \"path_with_namespace\": \"oschina/gitee\"\r\n },\r\n \"sender\": {\r\n \"id\": 1,\r\n \"login\": \"robot\",\r\n \"avatar_url\": \"https://gitee.com/assets/favicon.ico\",\r\n \"html_url\": \"https://gitee.com/robot\",\r\n \"type\": \"User\",\r\n \"site_admin\": false,\r\n \"name\": \"robot\",\r\n \"email\": \"robot@gitee.com\",\r\n \"username\": \"robot\",\r\n \"user_name\": \"robot\",\r\n \"url\": \"https://gitee.com/robot\"\r\n },\r\n \"enterprise\": {\r\n \"name\": \"开源中国\",\r\n \"url\": \"https://gitee.com/oschina\"\r\n }\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": "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": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
|
"TableName": "Git_事件记录",
|
|
"UpdateType": "add",
|
|
"ShowConfirm": false,
|
|
"UpdateBindingValues": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "事件名称",
|
|
"GUID": "b5698686-4edb-4a65-a2e5-45ed333fadc5"
|
|
},
|
|
"Value": "签入工程"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "hook_id",
|
|
"GUID": "fd4a5dbb-e0ad-4bf7-9322-d9adf645eb32"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.hook_id"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "事件内容",
|
|
"GUID": "df11c98f-3267-4f64-94db-e7770898100e"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=message.Message"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "空间路径",
|
|
"GUID": "65e021d0-421e-4513-b77d-627a293cca44"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.namespace"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库名称",
|
|
"GUID": "6e0426ba-e02d-4d5b-978f-02aaa78e2f1d"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.name"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库路径",
|
|
"GUID": "9a4a577a-89ff-45fe-9403-b76a61ca264e"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.path"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "url",
|
|
"GUID": "132e4684-4a02-4380-8595-93f2780e327a"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.url"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "提交人",
|
|
"GUID": "0f80fa89-fa73-4a11-abfb-700ebd4bee12"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.committer.name"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "git用户名",
|
|
"GUID": "4b26a8fd-1245-4a97-acdd-f474f45f7cfd"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.committer.username"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库ID",
|
|
"GUID": "61b0a85a-db65-4576-9e9f-29c51865599e"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.id"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "0",
|
|
"Message": "签入已被记录"
|
|
}
|
|
],
|
|
"ID": "61cdb37b-e3df-4ec8-b55d-6cc16166bcbd"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "今日记录",
|
|
"TableValue": {
|
|
"TableName": "Git_事件记录",
|
|
"TableValueType": 3,
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess",
|
|
"SubConditions": [
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库ID",
|
|
"GUID": "715f1edb-652c-46e3-b189-4c8bd44cf1d1"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.id"
|
|
}
|
|
},
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "git用户名",
|
|
"GUID": "4410e001-f94f-43ee-8ae0-b8a789a71786"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.committer.username"
|
|
}
|
|
},
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "FGC_CreateDate",
|
|
"GUID": "1f8b096d-adc6-4715-ab1e-2919781aca6b"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=TODAY()"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"ID": "870440a4356a42c68a1979afdc94a1d5"
|
|
},
|
|
{
|
|
"$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": "0"
|
|
},
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
|
"TableName": "Git_事件记录",
|
|
"UpdateType": "add",
|
|
"ShowConfirm": false,
|
|
"UpdateBindingValues": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "事件名称",
|
|
"GUID": "987654e9-a86d-4983-98c3-1d5c2b94733f"
|
|
},
|
|
"Value": "签出模块"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "hook_id",
|
|
"GUID": "bca8da11-66d8-4365-b254-881fd7e5dcd7"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.hook_id"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "事件内容",
|
|
"GUID": "7eef9be6-a388-4e96-9b01-758d8efd041e"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=SUBSTITUTE(message.Message,\"签出模块 : \",\"\")"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "空间路径",
|
|
"GUID": "69513fe0-9c5a-402a-9315-2e25e0d97ed1"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.namespace"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库名称",
|
|
"GUID": "039c74bf-f727-4425-b446-8c39180ff5a3"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.name"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库路径",
|
|
"GUID": "6b130a65-144f-449d-a106-59551eb02836"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.path"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "url",
|
|
"GUID": "b0b69598-37b2-42a0-b2a9-ae2a841bbf35"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.url"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "提交人",
|
|
"GUID": "103181f1-6b88-4a0f-acf5-3abe972d80b0"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.committer.name"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "git用户名",
|
|
"GUID": "e5bfa05a-f1f9-4aa7-be57-adc7318bf57e"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.committer.username"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库ID",
|
|
"GUID": "2da4c9d9-7976-4cb5-b058-85b95eea804c"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.id"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "b183a29c-3c17-4c4c-9de2-2b5ab4a32f01"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "0",
|
|
"Message": "忽略非签入事件"
|
|
}
|
|
],
|
|
"ID": "a372f8cc-845f-42c5-870b-66e27f536a22"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "0e35e22f-578c-4d58-baee-93e4256386f5"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |