@@ -8,10 +8,8 @@ import JSZip from 'jszip';
88import * as vscode from 'vscode' ;
99import { AuthProvider } from '../common/authentication' ;
1010import Logger from '../common/logger' ;
11- import { OctokitCommon } from './common' ;
1211import { CredentialStore } from './credentials' ;
1312import { LoggingOctokit } from './loggingOctokit' ;
14- import { PullRequestModel } from './pullRequestModel' ;
1513import { hasEnterpriseUri } from './utils' ;
1614
1715const LEARN_MORE_URL = 'https://docs.github.com/en/copilot/how-tos/agents/copilot-coding-agent' ;
@@ -109,37 +107,6 @@ export class CopilotApi {
109107 }
110108 }
111109
112- public async getWorkflowRunsFromAction ( pullRequest : PullRequestModel ) : Promise < OctokitCommon . ListWorkflowRunsForRepo > {
113- const createdDate = new Date ( pullRequest . createdAt ) ;
114- const created = `>=${ createdDate . getFullYear ( ) } -${ String ( createdDate . getMonth ( ) + 1 ) . padStart ( 2 , '0' ) } -${ String ( createdDate . getDate ( ) ) . padStart ( 2 , '0' ) } ` ;
115- const allRuns : any [ ] = [ ] ;
116- let page = 1 ;
117- let hasMore = true ;
118- const per_page = 100 ;
119- while ( hasMore ) {
120- const runs = await this . octokit . api . actions . listWorkflowRunsForRepo ( {
121- owner : pullRequest . remote . owner ,
122- repo : pullRequest . remote . repositoryName ,
123- event : 'dynamic' ,
124- created,
125- per_page,
126- page
127- } ) ;
128- if ( runs . status !== 200 ) {
129- throw new Error ( `Failed to fetch workflow runs: ${ runs . status } ` ) ;
130- }
131- if ( Array . isArray ( runs . data . workflow_runs ) ) {
132- allRuns . push ( ...runs . data . workflow_runs ) ;
133- hasMore = runs . data . total_count > allRuns . length ;
134- page ++ ;
135- } else {
136- hasMore = false ;
137- }
138- }
139- // Return only the workflow_runs array for compatibility
140- return allRuns as unknown as OctokitCommon . ListWorkflowRunsForRepo ;
141- }
142-
143110 public async getLogsFromZipUrl ( logsUrl : string ) : Promise < string [ ] > {
144111 const logsZip = await fetch ( logsUrl , {
145112 headers : {
0 commit comments