mirror of
https://github.com/git-touch/git-touch
synced 2025-03-05 03:37:42 +01:00
fix(github): cross reference event
This commit is contained in:
parent
85d5cadbeb
commit
0d722f062e
@ -103,12 +103,19 @@ class TimelineItem extends StatelessWidget {
|
||||
case 'IssueComment':
|
||||
return CommentItem.gh(p);
|
||||
case 'CrossReferencedEvent':
|
||||
final number = p['source']['number'] as int;
|
||||
final owner = p['source']['repository']['owner']['login'] as String;
|
||||
final name = p['source']['repository']['name'] as String;
|
||||
final prefix = p['source']['__typename'] == 'Issue' ? 'issues' : 'pull';
|
||||
return TimelineEventItem(
|
||||
actor: p['actor']['login'],
|
||||
iconData: Octicons.primitive_dot,
|
||||
iconColor: GithubPalette.open,
|
||||
textSpan: TextSpan(
|
||||
text: ' referenced this on #' + p['source']['number'].toString()),
|
||||
textSpan: TextSpan(children: [
|
||||
TextSpan(text: ' referenced this on '),
|
||||
createLinkSpan(context, '$owner/$name#$number',
|
||||
'/github/$owner/$name/$prefix/$number'),
|
||||
]),
|
||||
p: p,
|
||||
);
|
||||
case 'ClosedEvent':
|
||||
|
Loading…
x
Reference in New Issue
Block a user