@@ -8,10 +8,8 @@ import JSZip from 'jszip';
8
8
import * as vscode from 'vscode' ;
9
9
import { AuthProvider } from '../common/authentication' ;
10
10
import Logger from '../common/logger' ;
11
- import { OctokitCommon } from './common' ;
12
11
import { CredentialStore } from './credentials' ;
13
12
import { LoggingOctokit } from './loggingOctokit' ;
14
- import { PullRequestModel } from './pullRequestModel' ;
15
13
import { hasEnterpriseUri } from './utils' ;
16
14
17
15
const LEARN_MORE_URL = 'https://docs.github.com/en/copilot/how-tos/agents/copilot-coding-agent' ;
@@ -109,37 +107,6 @@ export class CopilotApi {
109
107
}
110
108
}
111
109
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
-
143
110
public async getLogsFromZipUrl ( logsUrl : string ) : Promise < string [ ] > {
144
111
const logsZip = await fetch ( logsUrl , {
145
112
headers : {
0 commit comments