@@ -124,6 +124,8 @@ export async function fetchDiscussionThreads(opts: {
124
124
threadID ?: GQL . ID ;
125
125
authorUserID ?: GQL . ID ;
126
126
targetRepositoryID ?: GQL . ID ;
127
+ targetRepositoryName ?: string ;
128
+ targetRepositoryGitCloneURL ?: string ;
127
129
targetRepositoryPath ?: string ;
128
130
relativeRev ?: string ;
129
131
} ) : Promise < GQL . IDiscussionThreadConnection > {
@@ -136,6 +138,8 @@ export async function fetchDiscussionThreads(opts: {
136
138
$threadID: ID
137
139
$authorUserID: ID
138
140
$targetRepositoryID: ID
141
+ $targetRepositoryName: String
142
+ $targetRepositoryGitCloneURL: String
139
143
$targetRepositoryPath: String
140
144
$relativeRev: String!
141
145
) {
@@ -145,6 +149,8 @@ export async function fetchDiscussionThreads(opts: {
145
149
threadID: $threadID
146
150
authorUserID: $authorUserID
147
151
targetRepositoryID: $targetRepositoryID
152
+ targetRepositoryName: $targetRepositoryName
153
+ targetRepositoryGitCloneURL: $targetRepositoryGitCloneURL
148
154
targetRepositoryPath: $targetRepositoryPath
149
155
) {
150
156
totalCount
@@ -266,27 +272,3 @@ export async function renderMarkdown(
266
272
}
267
273
return data . renderMarkdown ;
268
274
}
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