@@ -124,6 +124,8 @@ export async function fetchDiscussionThreads(opts: {
124124 threadID ?: GQL . ID ;
125125 authorUserID ?: GQL . ID ;
126126 targetRepositoryID ?: GQL . ID ;
127+ targetRepositoryName ?: string ;
128+ targetRepositoryGitCloneURL ?: string ;
127129 targetRepositoryPath ?: string ;
128130 relativeRev ?: string ;
129131} ) : Promise < GQL . IDiscussionThreadConnection > {
@@ -136,6 +138,8 @@ export async function fetchDiscussionThreads(opts: {
136138 $threadID: ID
137139 $authorUserID: ID
138140 $targetRepositoryID: ID
141+ $targetRepositoryName: String
142+ $targetRepositoryGitCloneURL: String
139143 $targetRepositoryPath: String
140144 $relativeRev: String!
141145 ) {
@@ -145,6 +149,8 @@ export async function fetchDiscussionThreads(opts: {
145149 threadID: $threadID
146150 authorUserID: $authorUserID
147151 targetRepositoryID: $targetRepositoryID
152+ targetRepositoryName: $targetRepositoryName
153+ targetRepositoryGitCloneURL: $targetRepositoryGitCloneURL
148154 targetRepositoryPath: $targetRepositoryPath
149155 ) {
150156 totalCount
@@ -266,27 +272,3 @@ export async function renderMarkdown(
266272 }
267273 return data . renderMarkdown ;
268274}
269-
270- /**
271- * Turn a repository name into a GraphQL repository ID.
272- *
273- * @return Promise that emits the ID.
274- */
275- export async function resolveRepository (
276- repositoryName : string
277- ) : Promise < GQL . ID > {
278- let { data, errors } = await queryGraphQL (
279- `
280- query ResolveRepository($repositoryName: String!) {
281- repository(name:$repositoryName) {
282- id
283- }
284- }
285- ` ,
286- { repositoryName }
287- ) ;
288- if ( ! data || ! data . repository || ! data . repository . id ) {
289- throw createAggregateError ( errors ) ;
290- }
291- return data . repository . id ;
292- }
0 commit comments