Skip to content

Commit 9653cd1

Browse files
authored
Skipped status check is shown as pending (#3005)
Fixes #2580
1 parent 8318c63 commit 9653cd1

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Diff for: resources/icons/skip.svg

+1
Loading

Diff for: webviews/components/icon.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default Icon;
1414

1515
export const alertIcon = <Icon src={require('../../resources/icons/alert.svg')} />;
1616
export const checkIcon = <Icon src={require('../../resources/icons/check.svg')} />;
17+
export const skipIcon = <Icon src={require('../../resources/icons/skip.svg')} />;
1718
export const chevronIcon = <Icon src={require('../../resources/icons/chevron.svg')} />;
1819
export const commentIcon = <Icon src={require('../../resources/icons/comment.svg')} />;
1920
export const commitIcon = <Icon src={require('../../resources/icons/commit_icon.svg')} />;

Diff for: webviews/components/merge.tsx

+7-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { PullRequest } from '../common/cache';
1010
import PullRequestContext from '../common/context';
1111
import { Reviewer } from '../components/reviewer';
1212
import { Dropdown } from './dropdown';
13-
import { alertIcon, checkIcon, deleteIcon, mergeIcon, pendingIcon } from './icon';
13+
import { alertIcon, checkIcon, deleteIcon, mergeIcon, pendingIcon, skipIcon } from './icon';
1414
import { nbsp } from './space';
1515
import { Avatar } from './user';
1616

@@ -51,7 +51,7 @@ const StatusChecks = ({ pr }: { pr: PullRequest }) => {
5151
<div className="status-section">
5252
<div className="status-item">
5353
<StateIcon state={status.state} />
54-
<div>{getSummaryLabel(status.statuses)}</div>
54+
<div>{getSummaryLabel(status.statuses)}</div>
5555
<a href="javascript:void(0)" aria-role="button" onClick={toggleDetails}>
5656
{showDetails ? 'Hide' : 'Show'}
5757
</a>
@@ -375,14 +375,16 @@ function getSummaryLabel(statuses: any[]) {
375375
for (const statusType of Object.keys(statusTypes)) {
376376
const numOfType = statusTypes[statusType].length;
377377
let statusAdjective = '';
378-
379378
switch (statusType) {
380379
case 'success':
381380
statusAdjective = 'successful';
382381
break;
383382
case 'failure':
384383
statusAdjective = 'failed';
385384
break;
385+
case 'neutral':
386+
statusAdjective = 'skipped';
387+
break;
386388
default:
387389
statusAdjective = 'pending';
388390
}
@@ -398,6 +400,8 @@ function getSummaryLabel(statuses: any[]) {
398400

399401
function StateIcon({ state }: { state: string }) {
400402
switch (state) {
403+
case 'neutral':
404+
return skipIcon;
401405
case 'success':
402406
return checkIcon;
403407
case 'failure':

0 commit comments

Comments
 (0)