diff --git a/src/libs/github/models/issue.py b/src/libs/github/models/issue.py index 855395f..9c82bd6 100644 --- a/src/libs/github/models/issue.py +++ b/src/libs/github/models/issue.py @@ -4,7 +4,7 @@ @Author : yanyongyu @Date : 2021-03-11 16:57:04 @LastEditors : yanyongyu -@LastEditTime : 2021-08-20 23:24:08 +@LastEditTime : 2021-08-20 23:32:41 @Description : None @GitHub : https://github.com/yanyongyu """ @@ -23,7 +23,7 @@ from .comment import Comment from .timeline import ( TimelineEvent, TimelineEventCommited, TimelineEventForcePushed, TimelineEventHeadDeleted, TimelineEventReferenced, TimelineEventCommented, - TimelineEventCommentDeleted, TimelineEventMentioned, + TimelineEventCommentDeleted, TimelineEventAssigned, TimelineEventMentioned, TimelineEventSubscribed, TimelineEventUnsubscribed, TimelineEventReviewed, TimelineEventReviewRequested, TimelineEventReviewRemoved, TimelineEventReviewDismissed, TimelineEventRenamed, TimelineEventLabeled, @@ -102,13 +102,14 @@ class Issue(BaseModel): Union[TimelineEventCommited, TimelineEventForcePushed, TimelineEventHeadDeleted, TimelineEventReferenced, TimelineEventCommented, TimelineEventCommentDeleted, - TimelineEventMentioned, TimelineEventSubscribed, - TimelineEventUnsubscribed, TimelineEventReviewed, - TimelineEventReviewRequested, TimelineEventReviewRemoved, - TimelineEventReviewDismissed, TimelineEventRenamed, - TimelineEventLabeled, TimelineEventUnlabeled, - TimelineEventMerged, TimelineEventDeployed, - TimelineEventClosed, TimelineEventAddedToProject, + TimelineEventAssigned, TimelineEventMentioned, + TimelineEventSubscribed, TimelineEventUnsubscribed, + TimelineEventReviewed, TimelineEventReviewRequested, + TimelineEventReviewRemoved, TimelineEventReviewDismissed, + TimelineEventRenamed, TimelineEventLabeled, + TimelineEventUnlabeled, TimelineEventMerged, + TimelineEventDeployed, TimelineEventClosed, + TimelineEventAddedToProject, TimelineEventMovedColumnsInProject, TimelineEventRemovedFromProject, TimelineEventMilestoned, TimelineEventDemilestoned, TimelineEvent], diff --git a/src/libs/github/models/timeline.py b/src/libs/github/models/timeline.py index fe959dd..1933c60 100644 --- a/src/libs/github/models/timeline.py +++ b/src/libs/github/models/timeline.py @@ -4,7 +4,7 @@ @Author : yanyongyu @Date : 2021-05-14 00:57:33 @LastEditors : yanyongyu -@LastEditTime : 2021-08-20 23:23:33 +@LastEditTime : 2021-08-20 23:31:52 @Description : None @GitHub : https://github.com/yanyongyu """ @@ -131,6 +131,20 @@ class TimelineEventCommentDeleted(TimelineEvent): created_at: datetime +# Issue assigned to Person +class TimelineEventAssigned(TimelineEvent): + type: Literal["assigned"] + id: int + node_id: str + url: str + actor: Actor + commit_id: Optional[str] + commit_url: Optional[str] + created_at: datetime + assignee: Actor + assigner: Actor + + # Issue Mentioned Person class TimelineEventMentioned(TimelineEvent): event: Literal["mentioned"] diff --git a/src/plugins/github/libs/issue/templates/assigned.html b/src/plugins/github/libs/issue/templates/assigned.html new file mode 100644 index 0000000..3a8989a --- /dev/null +++ b/src/plugins/github/libs/issue/templates/assigned.html @@ -0,0 +1,52 @@ + + +