@@ -18,6 +18,7 @@ import type { IssueOrPullRequest, SearchedIssue } from '../models/issue';
1818import type { PullRequest , PullRequestState , SearchedPullRequest } from '../models/pullRequest' ;
1919import { isSha } from '../models/reference' ;
2020import type { Repository } from '../models/repository' ;
21+ import type { RepositoryMetadata } from '../models/repositoryMetadata' ;
2122import { ensurePaidPlan , RichRemoteProvider } from './richRemoteProvider' ;
2223
2324const autolinkFullIssuesRegex = / \b (?< repo > [ ^ / \s ] + \/ [ ^ / \s ] + ) # (?< num > [ 0 - 9 ] + ) \b (? ! ] \( ) / g;
@@ -259,7 +260,7 @@ export class GitHubRemote extends RichRemoteProvider {
259260 return `${ this . encodeUrl ( `${ this . baseUrl } ?path=${ fileName } ` ) } ${ line } ` ;
260261 }
261262
262- protected async getProviderAccountForCommit (
263+ protected override async getProviderAccountForCommit (
263264 { accessToken } : AuthenticationSession ,
264265 ref : string ,
265266 options ?: {
@@ -273,7 +274,7 @@ export class GitHubRemote extends RichRemoteProvider {
273274 } ) ;
274275 }
275276
276- protected async getProviderAccountForEmail (
277+ protected override async getProviderAccountForEmail (
277278 { accessToken } : AuthenticationSession ,
278279 email : string ,
279280 options ?: {
@@ -287,7 +288,7 @@ export class GitHubRemote extends RichRemoteProvider {
287288 } ) ;
288289 }
289290
290- protected async getProviderDefaultBranch ( {
291+ protected override async getProviderDefaultBranch ( {
291292 accessToken,
292293 } : AuthenticationSession ) : Promise < DefaultBranch | undefined > {
293294 const [ owner , repo ] = this . splitPath ( ) ;
@@ -296,7 +297,7 @@ export class GitHubRemote extends RichRemoteProvider {
296297 } ) ;
297298 }
298299
299- protected async getProviderIssueOrPullRequest (
300+ protected override async getProviderIssueOrPullRequest (
300301 { accessToken } : AuthenticationSession ,
301302 id : string ,
302303 ) : Promise < IssueOrPullRequest | undefined > {
@@ -306,7 +307,7 @@ export class GitHubRemote extends RichRemoteProvider {
306307 } ) ;
307308 }
308309
309- protected async getProviderPullRequestForBranch (
310+ protected override async getProviderPullRequestForBranch (
310311 { accessToken } : AuthenticationSession ,
311312 branch : string ,
312313 options ?: {
@@ -326,7 +327,7 @@ export class GitHubRemote extends RichRemoteProvider {
326327 } ) ;
327328 }
328329
329- protected async getProviderPullRequestForCommit (
330+ protected override async getProviderPullRequestForCommit (
330331 { accessToken } : AuthenticationSession ,
331332 ref : string ,
332333 ) : Promise < PullRequest | undefined > {
@@ -336,7 +337,16 @@ export class GitHubRemote extends RichRemoteProvider {
336337 } ) ;
337338 }
338339
339- protected async searchProviderMyPullRequests ( {
340+ protected override async getProviderRepositoryMetadata ( {
341+ accessToken,
342+ } : AuthenticationSession ) : Promise < RepositoryMetadata | undefined > {
343+ const [ owner , repo ] = this . splitPath ( ) ;
344+ return ( await this . container . github ) ?. getRepositoryMetadata ( this , accessToken , owner , repo , {
345+ baseUrl : this . apiBaseUrl ,
346+ } ) ;
347+ }
348+
349+ protected override async searchProviderMyPullRequests ( {
340350 accessToken,
341351 } : AuthenticationSession ) : Promise < SearchedPullRequest [ ] | undefined > {
342352 return ( await this . container . github ) ?. searchMyPullRequests ( this , accessToken , {
@@ -345,7 +355,7 @@ export class GitHubRemote extends RichRemoteProvider {
345355 } ) ;
346356 }
347357
348- protected async searchProviderMyIssues ( {
358+ protected override async searchProviderMyIssues ( {
349359 accessToken,
350360 } : AuthenticationSession ) : Promise < SearchedIssue [ ] | undefined > {
351361 return ( await this . container . github ) ?. searchMyIssues ( this , accessToken , {
0 commit comments