File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 11import * as vscode from "vscode" ;
2+
3+ import { GitHubContext , getGitHubContext } from "../git/repository" ;
24import {
35 getPinnedWorkflows ,
46 isPinnedWorkflowsRefreshEnabled ,
57 onPinnedWorkflowsChange ,
68 pinnedWorkflowsRefreshInterval ,
79} from "../configuration/configuration" ;
8- import { getGitHubContext , GitHubContext } from "../git/repository" ;
10+
911import { WorkflowRun } from "../model" ;
1012import { getCodIconForWorkflowrun } from "../treeViews/icons" ;
1113
@@ -140,6 +142,15 @@ async function updatePinnedWorkflow(
140142 pinnedWorkflow . statusBarItem . text = `$(${ getCodIconForWorkflowrun (
141143 mostRecentRun
142144 ) } ) ${ pinnedWorkflow . workflowName } `;
145+
146+ if ( mostRecentRun . conclusion === "failure" ) {
147+ pinnedWorkflow . statusBarItem . backgroundColor = new vscode . ThemeColor (
148+ "statusBarItem.errorBackground"
149+ ) ;
150+ } else {
151+ pinnedWorkflow . statusBarItem . backgroundColor = undefined ;
152+ }
153+
143154 pinnedWorkflow . statusBarItem . command = {
144155 title : "Open workflow run" ,
145156 command : "github-actions.workflow.run.open" ,
Original file line number Diff line number Diff line change @@ -25,7 +25,10 @@ export function getIconForWorkflowRun(runOrJob: IStatusAndConclusion) {
2525
2626function _getIconForWorkflowrun (
2727 runOrJob : IStatusAndConclusion
28- ) : string | vscode . ThemeIcon {
28+ ) :
29+ | string
30+ | vscode . ThemeIcon
31+ | { light : string | vscode . Uri ; dark : string | vscode . Uri } {
2932 switch ( runOrJob . status ) {
3033 case "completed" : {
3134 switch ( runOrJob . conclusion ) {
You can’t perform that action at this time.
0 commit comments