diff --git a/internal/pkg/github/mapper.go b/internal/pkg/github/mapper.go index e672822f..e807f88c 100644 --- a/internal/pkg/github/mapper.go +++ b/internal/pkg/github/mapper.go @@ -99,13 +99,16 @@ func mapGithubStatusToStatus(s *github.RepoStatus) *extent.Status { state = extent.StatusStatePending } - return &extent.Status{ - Context: *s.Context, - // TODO: fix + status := &extent.Status{ + Context: *s.Context, AvatarURL: "", - TargetURL: *s.TargetURL, State: state, } + if s.TargetURL != nil { + status.TargetURL = *s.TargetURL + } + + return status } func mapGithubCheckRunToStatus(c *github.CheckRun) *extent.Status { diff --git a/ui/src/App.less b/ui/src/App.less index 642ea1a9..e69053a8 100644 --- a/ui/src/App.less +++ b/ui/src/App.less @@ -30,12 +30,4 @@ border-left: 4px solid rgba(100,100,100,.2); opacity: .85; } - - &-pending-icon { - height: 6px; - width: 6px; - background-color: #bf8700; - border-radius: 50%; - display: inline-block; - } } diff --git a/ui/src/components/ReviewerList.tsx b/ui/src/components/ReviewerList.tsx index 31493c69..8bb7f81e 100644 --- a/ui/src/components/ReviewerList.tsx +++ b/ui/src/components/ReviewerList.tsx @@ -1,5 +1,5 @@ import { List, Avatar, Popover, Button } from "antd" -import { CheckOutlined, CloseOutlined, CommentOutlined } from "@ant-design/icons" +import { CheckOutlined, CloseOutlined, CommentOutlined, SyncOutlined } from "@ant-design/icons" import { User, Review, ReviewStatusEnum } from "../models" @@ -26,13 +26,13 @@ function ReviewItem(props: {review: Review}): JSX.Element { const status = (status: ReviewStatusEnum) => { switch (status) { case ReviewStatusEnum.Pending: - return <>   + return case ReviewStatusEnum.Approved: return case ReviewStatusEnum.Rejected: return default: - return <>   + return } } @@ -82,5 +82,5 @@ export function ReviewStatus(props: {reviews: Review[]}): JSX.Element { } } - return   Pending + return   Pending } diff --git a/ui/src/components/StatusStateIcon.tsx b/ui/src/components/StatusStateIcon.tsx index 33f41091..276d3a20 100644 --- a/ui/src/components/StatusStateIcon.tsx +++ b/ui/src/components/StatusStateIcon.tsx @@ -1,5 +1,5 @@ import { Popover, Avatar, Typography, Row, Col, Divider, Space } from "antd" -import { CheckOutlined, CloseOutlined, StopOutlined, ExclamationCircleOutlined } from "@ant-design/icons" +import { CheckOutlined, CloseOutlined, StopOutlined, SyncOutlined, ExclamationCircleOutlined } from "@ant-design/icons" import { Status, StatusState } from "../models" @@ -66,11 +66,7 @@ function mapStateToIcon(state: StatusState): JSX.Element { case StatusState.Null: return <> case StatusState.Pending: - return ( - -    - - ) + return case StatusState.Success: return case StatusState.Failure: @@ -80,11 +76,7 @@ function mapStateToIcon(state: StatusState): JSX.Element { case StatusState.Skipped: return default: - return ( - -    - - ) + return } }