@@ -426,6 +426,156 @@ def create_gitlab_repo(
426426}
427427"""
428428
429+ ISSUE_CLOSED_EVENT = b"""{
430+ "object_kind": "issue",
431+ "event_type": "issue",
432+ "user": {
433+ "id": 1,
434+ "name": "Administrator",
435+ "username": "root",
436+ "avatar_url": "http://www.gravatar.com/avatar/avatar.jpg",
437+ "email": "admin@example.com"
438+ },
439+ "project": {
440+ "id": 15,
441+ "name": "Sentry",
442+ "description": "",
443+ "web_url": "http://example.com/cool-group/sentry",
444+ "avatar_url": null,
445+ "git_ssh_url": "git@example.com:cool-group/sentry.git",
446+ "git_http_url": "http://example.com/cool-group/sentry.git",
447+ "namespace": "cool-group",
448+ "visibility_level": 0,
449+ "path_with_namespace": "cool-group/sentry",
450+ "default_branch": "master",
451+ "homepage": "http://example.com/cool-group/sentry",
452+ "url": "git@example.com:cool-group/sentry.git",
453+ "ssh_url": "git@example.com:cool-group/sentry.git",
454+ "http_url": "http://example.com/cool-group/sentry.git"
455+ },
456+ "object_attributes": {
457+ "id": 301,
458+ "title": "Test issue",
459+ "assignee_ids": [],
460+ "assignee_id": null,
461+ "author_id": 1,
462+ "project_id": 15,
463+ "created_at": "2023-01-01 00:00:00 UTC",
464+ "updated_at": "2023-01-01 00:00:00 UTC",
465+ "position": 0,
466+ "branch_name": null,
467+ "description": "Test issue description",
468+ "milestone_id": null,
469+ "state": "closed",
470+ "iid": 23,
471+ "url": "http://example.com/cool-group/sentry/issues/23",
472+ "action": "close"
473+ },
474+ "assignees": [],
475+ "labels": []
476+ }
477+ """
478+
479+ ISSUE_REOPENED_EVENT = b"""{
480+ "object_kind": "issue",
481+ "event_type": "issue",
482+ "user": {
483+ "id": 1,
484+ "name": "Administrator",
485+ "username": "root",
486+ "avatar_url": "http://www.gravatar.com/avatar/avatar.jpg",
487+ "email": "admin@example.com"
488+ },
489+ "project": {
490+ "id": 15,
491+ "name": "Sentry",
492+ "description": "",
493+ "web_url": "http://example.com/cool-group/sentry",
494+ "avatar_url": null,
495+ "git_ssh_url": "git@example.com:cool-group/sentry.git",
496+ "git_http_url": "http://example.com/cool-group/sentry.git",
497+ "namespace": "cool-group",
498+ "visibility_level": 0,
499+ "path_with_namespace": "cool-group/sentry",
500+ "default_branch": "master",
501+ "homepage": "http://example.com/cool-group/sentry",
502+ "url": "git@example.com:cool-group/sentry.git",
503+ "ssh_url": "git@example.com:cool-group/sentry.git",
504+ "http_url": "http://example.com/cool-group/sentry.git"
505+ },
506+ "object_attributes": {
507+ "id": 301,
508+ "title": "Test issue",
509+ "assignee_ids": [],
510+ "assignee_id": null,
511+ "author_id": 1,
512+ "project_id": 15,
513+ "created_at": "2023-01-01 00:00:00 UTC",
514+ "updated_at": "2023-01-01 00:00:00 UTC",
515+ "position": 0,
516+ "branch_name": null,
517+ "description": "Test issue description",
518+ "milestone_id": null,
519+ "state": "opened",
520+ "iid": 23,
521+ "url": "http://example.com/cool-group/sentry/issues/23",
522+ "action": "reopen"
523+ },
524+ "assignees": [],
525+ "labels": []
526+ }
527+ """
528+
529+ ISSUE_OPENED_EVENT = b"""{
530+ "object_kind": "issue",
531+ "event_type": "issue",
532+ "user": {
533+ "id": 1,
534+ "name": "Administrator",
535+ "username": "root",
536+ "avatar_url": "http://www.gravatar.com/avatar/avatar.jpg",
537+ "email": "admin@example.com"
538+ },
539+ "project": {
540+ "id": 15,
541+ "name": "Sentry",
542+ "description": "",
543+ "web_url": "http://example.com/cool-group/sentry",
544+ "avatar_url": null,
545+ "git_ssh_url": "git@example.com:cool-group/sentry.git",
546+ "git_http_url": "http://example.com/cool-group/sentry.git",
547+ "namespace": "cool-group",
548+ "visibility_level": 0,
549+ "path_with_namespace": "cool-group/sentry",
550+ "default_branch": "master",
551+ "homepage": "http://example.com/cool-group/sentry",
552+ "url": "git@example.com:cool-group/sentry.git",
553+ "ssh_url": "git@example.com:cool-group/sentry.git",
554+ "http_url": "http://example.com/cool-group/sentry.git"
555+ },
556+ "object_attributes": {
557+ "id": 301,
558+ "title": "Test issue",
559+ "assignee_ids": [],
560+ "assignee_id": null,
561+ "author_id": 1,
562+ "project_id": 15,
563+ "created_at": "2023-01-01 00:00:00 UTC",
564+ "updated_at": "2023-01-01 00:00:00 UTC",
565+ "position": 0,
566+ "branch_name": null,
567+ "description": "Test issue description",
568+ "milestone_id": null,
569+ "state": "opened",
570+ "iid": 23,
571+ "url": "http://example.com/cool-group/sentry/issues/23",
572+ "action": "open"
573+ },
574+ "assignees": [],
575+ "labels": []
576+ }
577+ """
578+
429579COMPARE_RESPONSE = r"""
430580{
431581 "commit": {
0 commit comments