diff --git a/webhook_schemas/branches_merge_conflict.json b/webhook_schemas/branches_merge_conflict.json new file mode 100644 index 000000000..bb183733c --- /dev/null +++ b/webhook_schemas/branches_merge_conflict.json @@ -0,0 +1,197 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "event": { + "type": "string" + }, + "message": { + "type": "string" + }, + "sent_at": { + "type": "string", + "format": "date-time" + }, + "user": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "gravatar_uid": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "username", + "name", + "gravatar_uid" + ] + }, + "project": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "main_format": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "name", + "main_format", + "created_at", + "updated_at" + ] + }, + "branch": { + "type": "object", + "properties": { + "base_project_id": { + "type": [ + "string", + "null" + ] + }, + "branch_project_id": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "merged_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "merged_by": { + "type": [ + "object", + "null" + ], + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "gravatar_uid": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "username", + "name", + "gravatar_uid" + ] + }, + "created_by": { + "type": [ + "object", + "null" + ], + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "gravatar_uid": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "username", + "name", + "gravatar_uid" + ] + }, + "state": { + "type": "string" + } + }, + "required": [ + "name", + "base_project_id", + "branch_project_id", + "created_at", + "updated_at", + "merged_at", + "state", + "created_by", + "merged_by" + ] + } + }, + "required": [ + "event", + "message", + "user", + "project", + "branch" + ] +} diff --git a/webhook_schemas/branches_merge_conflict_example.json b/webhook_schemas/branches_merge_conflict_example.json new file mode 100644 index 000000000..8408f979f --- /dev/null +++ b/webhook_schemas/branches_merge_conflict_example.json @@ -0,0 +1,37 @@ +{ + "event": "branches:merge_conflict", + "message": "john.smith could not merge branch new-feature-1 in project Translation Project due to a conflict", + "sent_at": "2025-02-07 16:44:04 UTC", + "user": { + "id": "24b9a53ad72e198ca332fba91bb95f57", + "username": "john.smith", + "name": "John Smith", + "gravatar_uid": "1bc5edb4799fd8eec67c66122f47eb73" + }, + "project": { + "id": "b2abd3bd2c23ff0ac546e0a2d9aa0be1", + "name": "Translation Project", + "slug": "translation-project", + "main_format": "yml", + "project_image_url": null, + "created_at": "2025-02-07 16:18:13 UTC", + "updated_at": "2025-02-07 16:18:13 UTC", + "point_of_contact": null + }, + "branch": { + "name": "new-feature-1", + "base_project_id": "b2abd3bd2c23ff0ac546e0a2d9aa0be1", + "branch_project_id": "8228978fc13f5eb3c4cbbe8ac9882b64", + "created_at": "2025-02-07 16:18:13 UTC", + "updated_at": "2025-02-07 16:44:04 UTC", + "merged_at": null, + "state": "merge_conflict", + "created_by": { + "id": "24b9a53ad72e198ca332fba91bb95f57", + "username": "john.smith", + "name": "John Smith", + "gravatar_uid": "1bc5edb4799fd8eec67c66122f47eb73" + }, + "merged_by": null + } +} \ No newline at end of file diff --git a/webhook_schemas/branches_merge_error.json b/webhook_schemas/branches_merge_error.json new file mode 100644 index 000000000..bb183733c --- /dev/null +++ b/webhook_schemas/branches_merge_error.json @@ -0,0 +1,197 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "event": { + "type": "string" + }, + "message": { + "type": "string" + }, + "sent_at": { + "type": "string", + "format": "date-time" + }, + "user": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "gravatar_uid": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "username", + "name", + "gravatar_uid" + ] + }, + "project": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "main_format": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "name", + "main_format", + "created_at", + "updated_at" + ] + }, + "branch": { + "type": "object", + "properties": { + "base_project_id": { + "type": [ + "string", + "null" + ] + }, + "branch_project_id": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "merged_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "merged_by": { + "type": [ + "object", + "null" + ], + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "gravatar_uid": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "username", + "name", + "gravatar_uid" + ] + }, + "created_by": { + "type": [ + "object", + "null" + ], + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "gravatar_uid": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "username", + "name", + "gravatar_uid" + ] + }, + "state": { + "type": "string" + } + }, + "required": [ + "name", + "base_project_id", + "branch_project_id", + "created_at", + "updated_at", + "merged_at", + "state", + "created_by", + "merged_by" + ] + } + }, + "required": [ + "event", + "message", + "user", + "project", + "branch" + ] +} diff --git a/webhook_schemas/branches_merge_error_example.json b/webhook_schemas/branches_merge_error_example.json new file mode 100644 index 000000000..8bd2a5a06 --- /dev/null +++ b/webhook_schemas/branches_merge_error_example.json @@ -0,0 +1,37 @@ +{ + "event": "branches:merge_error", + "message": "john.smith could not merge branch new-feature-1 in project Translation Project due to an unexpected error", + "sent_at": "2025-02-07 16:44:04 UTC", + "user": { + "id": "24b9a53ad72e198ca332fba91bb95f57", + "username": "john.smith", + "name": "John Smith", + "gravatar_uid": "1bc5edb4799fd8eec67c66122f47eb73" + }, + "project": { + "id": "b2abd3bd2c23ff0ac546e0a2d9aa0be1", + "name": "Translation Project", + "slug": "translation-project", + "main_format": "yml", + "project_image_url": null, + "created_at": "2025-02-07 16:18:13 UTC", + "updated_at": "2025-02-07 16:18:13 UTC", + "point_of_contact": null + }, + "branch": { + "name": "new-feature-1", + "base_project_id": "b2abd3bd2c23ff0ac546e0a2d9aa0be1", + "branch_project_id": "8228978fc13f5eb3c4cbbe8ac9882b64", + "created_at": "2025-02-07 16:18:13 UTC", + "updated_at": "2025-02-07 16:44:04 UTC", + "merged_at": null, + "state": "merge_error", + "created_by": { + "id": "24b9a53ad72e198ca332fba91bb95f57", + "username": "john.smith", + "name": "John Smith", + "gravatar_uid": "1bc5edb4799fd8eec67c66122f47eb73" + }, + "merged_by": null + } +} \ No newline at end of file