mirror of
https://github.com/git-touch/git-touch
synced 2025-02-01 08:26:53 +01:00
feat: handle create event
This commit is contained in:
parent
5f340e4502
commit
bb0d9d5d01
@ -62,6 +62,7 @@ class GithubEventPayload {
|
||||
GithubEventRelease release;
|
||||
String action;
|
||||
String ref;
|
||||
String refType;
|
||||
String before;
|
||||
String head;
|
||||
List<GithubEventCommit> commits;
|
||||
|
@ -70,6 +70,7 @@ GithubEventPayload _$GithubEventPayloadFromJson(Map<String, dynamic> json) {
|
||||
: GithubEventRelease.fromJson(json['release'] as Map<String, dynamic>)
|
||||
..action = json['action'] as String
|
||||
..ref = json['ref'] as String
|
||||
..refType = json['ref_type'] as String
|
||||
..before = json['before'] as String
|
||||
..head = json['head'] as String
|
||||
..commits = (json['commits'] as List)
|
||||
@ -88,6 +89,7 @@ Map<String, dynamic> _$GithubEventPayloadToJson(GithubEventPayload instance) =>
|
||||
'release': instance.release,
|
||||
'action': instance.action,
|
||||
'ref': instance.ref,
|
||||
'ref_type': instance.refType,
|
||||
'before': instance.before,
|
||||
'head': instance.head,
|
||||
'commits': instance.commits,
|
||||
|
@ -262,6 +262,14 @@ class EventItem extends StatelessWidget {
|
||||
case 'CommitCommentEvent':
|
||||
case 'ContentReferenceEvent':
|
||||
case 'CreateEvent':
|
||||
return _buildItem(
|
||||
context: context,
|
||||
spans: <InlineSpan>[
|
||||
TextSpan(
|
||||
text: ' created ${e.payload.refType} ${e.payload.ref} at '),
|
||||
_buildRepo(context),
|
||||
],
|
||||
);
|
||||
case 'DeleteEvent':
|
||||
case 'DeploymentEvent':
|
||||
case 'DeploymentStatusEvent':
|
||||
|
Loading…
x
Reference in New Issue
Block a user