forked from namefailed/CodeMechanic-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevents.py
More file actions
35 lines (27 loc) · 771 Bytes
/
events.py
File metadata and controls
35 lines (27 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from dataclasses import dataclass, field
from typing import Any, Dict, Optional
@dataclass
class BaseEvent:
event_type: str
payload: Dict[str, Any] = field(default_factory=dict)
@dataclass
class BountyFoundEvent(BaseEvent):
event_type: str = "BOUNTY_FOUND"
@dataclass
class BountyVerifiedEvent(BaseEvent):
event_type: str = "BOUNTY_VERIFIED"
@dataclass
class PRReadyEvent(BaseEvent):
event_type: str = "PR_READY"
@dataclass
class PRSubmittedEvent(BaseEvent):
event_type: str = "PR_SUBMITTED"
@dataclass
class ScamDetectedEvent(BaseEvent):
event_type: str = "SCAM_DETECTED"
@dataclass
class PRReviewedEvent(BaseEvent):
event_type: str = "PR_REVIEWED"
@dataclass
class PRRejectedEvent(BaseEvent):
event_type: str = "PR_REJECTED"