From 1d1804fa86f2e8eb572c478bd4abbd33cdffc41c Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Sun, 11 Oct 2020 22:12:53 +0800 Subject: [PATCH] fix(github): head ref name closes #116 --- lib/screens/gh_issue.dart | 8 ++------ lib/widgets/timeline_item.dart | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/screens/gh_issue.dart b/lib/screens/gh_issue.dart index f62d2d2..e9d94b0 100644 --- a/lib/screens/gh_issue.dart +++ b/lib/screens/gh_issue.dart @@ -314,9 +314,7 @@ __typename login } pullRequest { - headRef { - name - } + headRefName } } ... on BaseRefForcePushedEvent { @@ -342,9 +340,7 @@ __typename login } pullRequest { - headRef { - name - } + headRefName } beforeCommit { oid diff --git a/lib/widgets/timeline_item.dart b/lib/widgets/timeline_item.dart index 82692b6..6865a87 100644 --- a/lib/widgets/timeline_item.dart +++ b/lib/widgets/timeline_item.dart @@ -358,7 +358,7 @@ class TimelineItem extends StatelessWidget { textSpan: TextSpan(children: [ TextSpan(text: ' restored the '), WidgetSpan( - child: PrimerBranchName(p['pullRequest']['headRef']['name'])), + child: PrimerBranchName(p['pullRequest']['headRefName'])), TextSpan(text: ' branch') ]), ); @@ -370,7 +370,7 @@ class TimelineItem extends StatelessWidget { children: [ TextSpan(text: ' force-pushed the '), WidgetSpan( - child: PrimerBranchName(p['pullRequest']['headRef']['name'])), + child: PrimerBranchName(p['pullRequest']['headRefName'])), TextSpan(text: ' branch from '), TextSpan( text: (p['beforeCommit']['oid'] as String).substring(0, 7),