221 lines
15 KiB
JSON
221 lines
15 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": "48fafe37-7bc7-4552-8811-651a6a2b802c"
|
|
},
|
|
"Value": "签入工程"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "hook_id",
|
|
"GUID": "a8bc9b8a-1cb9-4f5d-9ce2-ad43c2057114"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.hook_id"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "提交人",
|
|
"GUID": "3be4ac18-3ac4-4b3b-9e97-8a22102cf4cd"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.committer.name"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "事件内容",
|
|
"GUID": "d51b1c57-b726-45a3-9fc3-a0818eb81e0c"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=message.Message"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "空间路径",
|
|
"GUID": "a25d4509-2f03-4a9c-ba87-d5d815674a4b"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.namespace"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库名称",
|
|
"GUID": "fae2341c-394d-4d46-94a6-9a035c8041df"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.name"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库路径",
|
|
"GUID": "dfcbc72c-02dc-43dd-996a-042748485d1b"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.path"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "url",
|
|
"GUID": "a7e7c542-ea5a-471e-be51-6b70e8d7f94b"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.url"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "git用户名",
|
|
"GUID": "90fa95b2-d77f-47c6-a901-6e7fc3fb673e"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.username"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库ID",
|
|
"GUID": "e2fe3138-ecda-4430-9b11-2535a9f0f05c"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.id"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "0",
|
|
"Message": "签入已被记录"
|
|
}
|
|
],
|
|
"ID": "13d8dbd7-8919-49ca-8f18-292b44f8e2ad"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "0",
|
|
"Message": "忽略非签入事件"
|
|
}
|
|
],
|
|
"ID": "eae9797b-acdc-47e4-b11a-952271b0401d"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "728a1fb4-2aa3-4c97-8d0e-a11b697a881c"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |