Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(webhook): Added webhook Events, Listeners, and Dispatcher #5

Merged
merged 4 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .testdata/webhook/bug_create_event.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"event": "bug::create",
"event_from": "web",
"referer": "https://www.tapd.cn/11112222/bugtrace/bugs/add",
"workspace_id": "11112222",
"current_user": "current_user",
"id": "1111112222001037239",
"title": "title title title",
"issue_id": "",
"is_new_status": "0",
"is_replicate": "0",
"create_link": "0",
"is_jenkins": "0",
"template_id": "1111112222001000320",
"description": "description",
"iteration_id": "0",
"custom_field_three": "custom_field_three",
"severity": "serious",
"priority": "",
"custom_field_four": "",
"current_owner": "current_owner",
"cc": "",
"de": "",
"te": "",
"custom_field_6": "",
"platform": "PC",
"bugtype": "",
"originphase": "",
"source": "",
"custom_field_one": "",
"description_type": "1",
"project_id": "11112222",
"is_draft": "0",
"begin": "",
"due": "",
"status": "new",
"reporter": "reporter",
"flows": "new",
"resolution": "",
"resolved": "",
"closed": "",
"in_progress_time": "",
"verify_time": "",
"reject_time": "",
"audit_time": "",
"suspend_time": "",
"secret": "asdfasecret-secret-secret-secret",
"rio_token": "",
"devproxy_host": "http://websocket-proxy",
"queue_id": "281687111",
"event_id": "168547222",
"created": "2024-08-27 14:54:15"
}
32 changes: 32 additions & 0 deletions .testdata/webhook/story_create_event.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"event": "story::create",
"event_from": "web",
"referer": "https://www.tapd.cn/11112222/prong/stories/add?workitem_type_id=1111112222001000077",
"workspace_id": "11112222",
"current_user": "current_user",
"id": "1111112222001071295",
"name": "asdfasdfasdfasdfasdf",
"description": "<p><span style=\"color: #3f4a56;\">adafsasdfasdf</span><br></p>",
"parent_id": "",
"category_id": "-1",
"iteration_id": "1111112222001001246",
"priority": "Middle",
"owner": "",
"begin": "2022-06-13",
"due": "2022-06-20",
"workitem_type_id": "1111112222001000077",
"status": "planning",
"templated_id": "1111112222001000399",
"description_type": "1",
"entity_type": "Story",
"remain": "0",
"ancestor_id": "0",
"creator": "creator",
"children_id": "",
"secret": "asdfasdfsadfasdf",
"rio_token": "",
"devproxy_host": "http://websocket-proxy",
"queue_id": "2822451111",
"event_id": "1687744222",
"created": "2024-08-28 19:08:06"
}
295 changes: 295 additions & 0 deletions .testdata/webhook/story_update_event.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
{
"event": "story::update",
"event_from": "web",
"referer": "https://www.tapd.cn/tapd_fe/111122222/gantt?dialog_preview_id=story_1111112222001069123",
"workspace_id": "11112222",
"current_user": "张三",
"id": "1111112222001069123",
"old_id": "1111112222001069123",
"old_secret_root_id": "0",
"old_sort": "106925600000",
"old_workitem_type_id": "1111112222001000008",
"old_name": "old name",
"old_description": "old description",
"old_markdown_description": "",
"old_description_type": "1",
"old_creator": "old creator",
"old_created": "2024-08-19 19:18:18",
"old_modified": "2024-08-26 13:02:29",
"old_parent_id": "0",
"old_children_id": "|",
"old_ancestor_id": "1111112222001069123",
"old_path": "1111112222001069123:",
"old_level": "0",
"old_workspace_id": "11112222",
"old_status": "audited",
"old_app_id": "1",
"old_flows": "",
"old_priority": "Middle",
"old_owner": "old owner",
"old_participator": "old participator",
"old_cc": "",
"old_begin": "2024-08-26",
"old_due": "2024-08-30",
"old_source": "",
"old_workitem_id": "",
"old_iteration_id": "0",
"old_issue_id": "",
"old_support_id": "",
"old_support_forum_id": "",
"old_module": "old module",
"old_completed": "",
"old_templated_id": "1111112222001000375",
"old_delay_count": "",
"old_type": "",
"old_status_append": "",
"old_business_value": "",
"old_tech_risk": "",
"old_size": "",
"old_import_flag": "0",
"old_effort": "",
"old_effort_completed": "0",
"old_exceed": "0",
"old_remain": "0",
"old_progress": "0",
"old_release_id": "0",
"old_feature": "",
"old_entity_type": "Story",
"old_custom_field_one": "",
"old_custom_field_two": "",
"old_custom_field_three": "",
"old_custom_field_four": "",
"old_custom_field_five": "",
"old_custom_field_six": "",
"old_custom_field_seven": "",
"old_custom_field_eight": "",
"old_attachment_count": "0",
"old_has_attachment": "0",
"old_developer": "",
"old_bug_id": "",
"old_test_focus": "",
"old_category_id": "1111112222001000712",
"old_version": "",
"old_confidential": "N",
"old_created_from": "",
"old_follower": "",
"old_sync_type": "",
"old_predecessor_count": "0",
"old_is_archived": "0",
"old_modifier": "",
"old_progress_manual": "0",
"old_successor_count": "0",
"old_label": "old label",
"old_step": "",
"old_custom_field_9": "",
"old_custom_field_10": "",
"old_custom_field_11": "",
"old_custom_field_12": "",
"old_custom_field_13": "",
"old_custom_field_14": "",
"old_custom_field_15": "",
"old_custom_field_16": "",
"old_custom_field_17": "",
"old_custom_field_18": "",
"old_custom_field_19": "",
"old_custom_field_20": "",
"old_custom_field_21": "",
"old_custom_field_22": "",
"old_custom_field_23": "",
"old_custom_field_24": "",
"old_custom_field_25": "",
"old_custom_field_26": "",
"old_custom_field_27": "",
"old_custom_field_28": "",
"old_custom_field_29": "",
"old_custom_field_30": "",
"old_custom_field_31": "",
"old_custom_field_32": "",
"old_custom_field_33": "",
"old_custom_field_34": "",
"old_custom_field_35": "",
"old_custom_field_36": "",
"old_custom_field_37": "",
"old_custom_field_38": "",
"old_custom_field_39": "",
"old_custom_field_40": "",
"old_custom_field_41": "",
"old_custom_field_42": "",
"old_custom_field_43": "",
"old_custom_field_44": "",
"old_custom_field_45": "",
"old_custom_field_46": "",
"old_custom_field_47": "",
"old_custom_field_48": "",
"old_custom_field_49": "",
"old_custom_field_50": "",
"old_custom_field_51": "",
"old_custom_field_52": "",
"old_custom_field_53": "",
"old_custom_field_54": "",
"old_custom_field_55": "",
"old_custom_field_56": "",
"old_custom_field_57": "",
"old_custom_field_58": "",
"old_custom_field_59": "",
"old_custom_field_60": "",
"old_custom_field_61": "",
"old_custom_field_62": "",
"old_custom_field_63": "",
"old_custom_field_64": "",
"old_custom_field_65": "",
"old_custom_field_66": "",
"old_custom_field_67": "",
"old_custom_field_68": "",
"old_custom_field_69": "",
"old_custom_field_70": "",
"old_custom_field_71": "",
"old_custom_field_72": "",
"old_custom_field_73": "",
"old_custom_field_74": "",
"old_custom_field_75": "",
"old_custom_field_76": "",
"old_custom_field_77": "",
"old_custom_field_78": "",
"old_custom_field_79": "",
"old_custom_field_80": "",
"old_custom_field_81": "",
"old_custom_field_82": "",
"old_custom_field_83": "",
"old_custom_field_84": "",
"old_custom_field_85": "",
"old_custom_field_86": "",
"old_custom_field_87": "",
"old_custom_field_88": "",
"old_custom_field_89": "",
"old_custom_field_90": "",
"old_custom_field_91": "",
"old_custom_field_92": "",
"old_custom_field_93": "",
"old_custom_field_94": "",
"old_custom_field_95": "",
"old_custom_field_96": "",
"old_custom_field_97": "",
"old_custom_field_98": "old custom field 98",
"old_custom_field_99": "",
"old_custom_field_100": "",
"old_custom_field_101": "",
"old_custom_field_102": "",
"old_custom_field_103": "",
"old_custom_field_104": "",
"old_custom_field_105": "",
"old_custom_field_106": "",
"old_custom_field_107": "",
"old_custom_field_108": "",
"old_custom_field_109": "",
"old_custom_field_110": "",
"old_custom_field_111": "",
"old_custom_field_112": "",
"old_custom_field_113": "",
"old_custom_field_114": "",
"old_custom_field_115": "",
"old_custom_field_116": "",
"old_custom_field_117": "",
"old_custom_field_118": "",
"old_custom_field_119": "",
"old_custom_field_120": "",
"old_custom_field_121": "",
"old_custom_field_122": "",
"old_custom_field_123": "",
"old_custom_field_124": "",
"old_custom_field_125": "",
"old_custom_field_126": "",
"old_custom_field_127": "",
"old_custom_field_128": "",
"old_custom_field_129": "",
"old_custom_field_130": "",
"old_custom_field_131": "",
"old_custom_field_132": "",
"old_custom_field_133": "",
"old_custom_field_134": "",
"old_custom_field_135": "",
"old_custom_field_136": "",
"old_custom_field_137": "",
"old_custom_field_138": "",
"old_custom_field_139": "",
"old_custom_field_140": "",
"old_custom_field_141": "",
"old_custom_field_142": "",
"old_custom_field_143": "",
"old_custom_field_144": "",
"old_custom_field_145": "",
"old_custom_field_146": "",
"old_custom_field_147": "",
"old_custom_field_148": "",
"old_custom_field_149": "",
"old_custom_field_150": "",
"old_custom_field_151": "",
"old_custom_field_152": "",
"old_custom_field_153": "",
"old_custom_field_154": "",
"old_custom_field_155": "",
"old_custom_field_156": "",
"old_custom_field_157": "",
"old_custom_field_158": "",
"old_custom_field_159": "",
"old_custom_field_160": "",
"old_custom_field_161": "",
"old_custom_field_162": "",
"old_custom_field_163": "",
"old_custom_field_164": "",
"old_custom_field_165": "",
"old_custom_field_166": "",
"old_custom_field_167": "",
"old_custom_field_168": "",
"old_custom_field_169": "",
"old_custom_field_170": "",
"old_custom_field_171": "",
"old_custom_field_172": "",
"old_custom_field_173": "",
"old_custom_field_174": "",
"old_custom_field_175": "",
"old_custom_field_176": "",
"old_custom_field_177": "",
"old_custom_field_178": "",
"old_custom_field_179": "",
"old_custom_field_180": "",
"old_custom_field_181": "",
"old_custom_field_182": "",
"old_custom_field_183": "",
"old_custom_field_184": "",
"old_custom_field_185": "",
"old_custom_field_186": "",
"old_custom_field_187": "",
"old_custom_field_188": "",
"old_custom_field_189": "",
"old_custom_field_190": "",
"old_custom_field_191": "",
"old_custom_field_192": "",
"old_custom_field_193": "",
"old_custom_field_194": "",
"old_custom_field_195": "",
"old_custom_field_196": "",
"old_custom_field_197": "",
"old_custom_field_198": "",
"old_custom_field_199": "",
"old_custom_field_200": "",
"old_custom_plan_field_1": "0",
"old_custom_plan_field_2": "0",
"old_custom_plan_field_3": "0",
"old_custom_plan_field_4": "0",
"old_custom_plan_field_5": "0",
"old_custom_plan_field_6": "0",
"old_custom_plan_field_7": "0",
"old_custom_plan_field_8": "0",
"old_custom_plan_field_9": "0",
"old_custom_plan_field_10": "0",
"new_owner": "new owner",
"new_modified": "2024-08-27 18:07:00",
"change_fields": "owner,modified",
"secret": "secret-secret-secret",
"rio_token": "",
"devproxy_host": "http://websocket-proxy",
"queue_id": "281818417",
"event_id": "168601153",
"created": "2024-08-27 18:07:00"
}
Loading
Loading