@@ -151,7 +151,7 @@ export class HistoryTreeDataProvider extends DisposableObject {
151151 switch ( element . status ) {
152152 case QueryStatus . InProgress :
153153 treeItem . iconPath = new ThemeIcon ( 'sync~spin' ) ;
154- treeItem . contextValue = ' inProgressResultsItem';
154+ treeItem . contextValue = element . t === 'local' ? ' inProgressResultsItem' : 'inProgressRemoteResultsItem ';
155155 break ;
156156 case QueryStatus . Completed :
157157 if ( element . t === 'local' ) {
@@ -450,6 +450,14 @@ export class QueryHistoryManager extends DisposableObject {
450450 }
451451 )
452452 ) ;
453+ this . push (
454+ commandRunner (
455+ 'codeQLQueryHistory.openOnGithub' ,
456+ async ( item : LocalQueryInfo ) => {
457+ return this . handleOpenOnGithub ( item , [ item ] ) ;
458+ }
459+ )
460+ ) ;
453461
454462 // There are two configuration items that affect the query history:
455463 // 1. The ttl for query history items.
@@ -856,6 +864,25 @@ export class QueryHistoryManager extends DisposableObject {
856864 ) ;
857865 }
858866
867+ async handleOpenOnGithub (
868+ singleItem : QueryHistoryInfo ,
869+ multiSelect : QueryHistoryInfo [ ] ,
870+ ) {
871+ const { finalSingleItem, finalMultiSelect } = this . determineSelection ( singleItem , multiSelect ) ;
872+
873+ // Remote queries only
874+ if ( ! this . assertSingleQuery ( finalMultiSelect ) || ! finalSingleItem || finalSingleItem . t !== 'remote' ) {
875+ return ;
876+ }
877+
878+ const { actionsWorkflowRunId : workflowRunId , controllerRepository : { owner, name } } = finalSingleItem . remoteQuery ;
879+
880+ await commands . executeCommand (
881+ 'vscode.open' ,
882+ Uri . parse ( `https://github.com/${ owner } /${ name } /actions/runs/${ workflowRunId } ` )
883+ ) ;
884+ }
885+
859886 async getQueryText ( item : QueryHistoryInfo ) : Promise < string > {
860887 return item . t === 'local'
861888 ? item . initialInfo . queryText
0 commit comments