420 lines
26 KiB
JSON
420 lines
26 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": "efbbf095-19cd-4dae-92ec-a0f26a2efbcd"
|
|
},
|
|
"Value": "签入工程"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "hook_id",
|
|
"GUID": "21366caf-c74c-4981-a013-6a7a67f6477d"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.hook_id"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "事件内容",
|
|
"GUID": "c854b847-0492-418f-b8ff-ec205e556c75"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=message.Message"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "空间路径",
|
|
"GUID": "4982e365-0843-42f7-aff4-1aff311903fd"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.namespace"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库名称",
|
|
"GUID": "c4d72e32-e0a7-4857-8cb1-df2f89597883"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.name"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库路径",
|
|
"GUID": "e12eb196-adc5-4aeb-95bc-c2f7d6eedbec"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.path"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "url",
|
|
"GUID": "4c3e3d4f-2dd9-4e3a-a49f-d90d31a16a7b"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.url"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "提交人",
|
|
"GUID": "347d5182-7b19-4a6f-8e5d-fc4612078592"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.committer.name"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "git用户名",
|
|
"GUID": "527d6e11-d777-454e-9677-3ec7fadb6a0f"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.committer.username"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库ID",
|
|
"GUID": "cf208007-6e12-4fd0-8cf5-fe0f4f1b3632"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.id"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "日期",
|
|
"GUID": "38c80d5e-0881-40ed-811f-d45eb2a521ce"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.committer.timestamp"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "0",
|
|
"Message": "签入已被记录"
|
|
}
|
|
],
|
|
"ID": "b9cf1980-a636-4a10-a6f5-e53f0711f9db"
|
|
},
|
|
{
|
|
"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": "7a9485e728ea41d3b1481daa62b7036b",
|
|
"Disabled": 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": "=今日记录"
|
|
}
|
|
},
|
|
"value": "0"
|
|
},
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
|
"TableName": "Git_事件记录",
|
|
"UpdateType": "add",
|
|
"ShowConfirm": false,
|
|
"UpdateBindingValues": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "事件名称",
|
|
"GUID": "0e6e01aa-5695-4e80-ac62-9e64cf34a86c"
|
|
},
|
|
"Value": "签出模块"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "hook_id",
|
|
"GUID": "dcf94894-2c9e-418e-966c-4f1e23906f71"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.hook_id"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "事件内容",
|
|
"GUID": "30f62c72-9b5b-468e-8913-dc78bfac2738"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=SUBSTITUTE(message.Message,\"签出模块 : \",\"\")"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "空间路径",
|
|
"GUID": "d97f0ab6-fad1-4d96-b62f-aa4f65cc42e4"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.namespace"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库名称",
|
|
"GUID": "15b9e3d3-cb05-475b-988f-e59667daa4c8"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.name"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库路径",
|
|
"GUID": "5dd5f4c1-9a4a-4308-a1d2-437ad831b120"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.path"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "url",
|
|
"GUID": "2f2a853b-0673-4a3b-b18c-d10b1ba53b40"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.url"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "提交人",
|
|
"GUID": "c0f7d5f9-d752-413e-b346-476b1c544f9d"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.committer.name"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "git用户名",
|
|
"GUID": "8c8e0a31-8990-4a0b-9b8c-94d084cb6681"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.head_commit.committer.username"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "Git_事件记录",
|
|
"ColumnName": "仓库ID",
|
|
"GUID": "e71e0310-04a8-4a38-886d-c297c63044e1"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=钩子数据.repository.id"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "12489899-d76f-4750-b786-fc6d7473bd14"
|
|
}
|
|
],
|
|
"Disabled": true
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "0",
|
|
"Message": "忽略非签入事件"
|
|
}
|
|
],
|
|
"ID": "2e4c36df-ab04-47b2-aa99-bb1085ff5228"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "635f8496-5932-492c-80b8-2ac48a2a04a1"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |