Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 90cebda

Browse files
author
Noah Hanjun Lee
authored
Display the first line of commit in UI (#142)
* Fix the layout of deployment responsible
1 parent ac2b0c1 commit 90cebda

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

ui/src/components/DeployForm.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,12 @@ function CommitDecorator(props: CommitDecoratorProps): JSX.Element {
305305
const tag = (props.commit.sha === props.currentDeployment?.sha) ?
306306
<AntdTag color="success">{props.currentDeployment.env}</AntdTag> :
307307
null
308+
309+
const [line] = props.commit.message.split(/(\r\n|\n|\r)/g, 1)
308310

309311
return (
310312
<span>
311-
<Text className="gitploy-code" code>{props.commit.sha.substring(0, 7)}</Text>{tag}- <Text strong>{props.commit.message}</Text> <br/>
313+
<Text className="gitploy-code" code>{props.commit.sha.substring(0, 7)}</Text>{tag}- <Text strong>{line}</Text> <br/>
312314
{(props.commit?.author)?
313315
<span >
314316
&nbsp;<Text ><Avatar size="small" src={props.commit.author.avatarUrl} /> {props.commit.author.login}</Text> <Text >committed {moment(props.commit.author?.date).fromNow()}</Text>

ui/src/components/DeploymentStatusSteps.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export default function DeploymentStatusSteps(props: DeploymentStatusStepsProps)
2222
<Steps
2323
current={props.deployment.statuses.length - 1}
2424
size="small"
25-
responsive>
25+
responsive
26+
>
2627
{props.deployment.statuses.map((status, idx) => {
2728
const title = (status.logUrl)?
2829
<a href={status.logUrl}>{status.status}</a> :

ui/src/views/Deployment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export default function DeploymentView(): JSX.Element {
183183
null}
184184
<Divider />
185185
</Col>
186-
<Col xs={{span: 24}} md={{span: 18}}>
186+
<Col xs={{span: 24}} md={(deployment.isApprovalEanbled)? {span: 18} : {span: 21}}>
187187
<DeployConfirm
188188
isDeployable={isDeployable(deployment, approvals)}
189189
deploying={RequestStatus.Pending === deploying}

0 commit comments

Comments
 (0)