@@ -120,7 +120,7 @@ async function getExistingDiscussions(octokit: Octokit, login: string) {
120
120
}
121
121
` ,
122
122
{
123
- q : `author:${ login } ` ,
123
+ q : `author:${ login } -repo:the-guild-org/crisp-chats ` ,
124
124
}
125
125
) ;
126
126
@@ -158,7 +158,7 @@ async function getExistingIssues(octokit: Octokit, login: string) {
158
158
}
159
159
` ,
160
160
{
161
- q : `author:${ login } ` ,
161
+ q : `author:${ login } -repo:the-guild-org/crisp-chats ` ,
162
162
}
163
163
) ;
164
164
@@ -167,19 +167,6 @@ async function getExistingIssues(octokit: Octokit, login: string) {
167
167
168
168
type Page = Awaited < ReturnType < Client [ "search" ] > > [ "results" ] [ number ] ;
169
169
170
- async function shouldDeletePage ( mdBlocks : MdBlock [ ] ) {
171
- if (
172
- mdBlocks . length > 0 &&
173
- mdBlocks [ 0 ] . parent &&
174
- typeof mdBlocks [ 0 ] . parent === "string" &&
175
- mdBlocks [ 0 ] . parent . trim ( ) . startsWith ( "/github-public" )
176
- ) {
177
- return false ;
178
- }
179
-
180
- return true ;
181
- }
182
-
183
170
type IssueCreateRecord = {
184
171
page : Page ;
185
172
repoId : string ;
@@ -304,12 +291,11 @@ async function buildUpdatePlan(
304
291
delete : [ ] ,
305
292
} ;
306
293
307
- const modified = await Promise . all (
294
+ await Promise . all (
308
295
pages . map ( async ( page ) => {
309
296
const pageTitle = extractPageTitle ( page ) ;
310
297
311
298
if ( ! pageTitle ) {
312
- console . warn ( `Skipped page due to missing title info:` , page ) ;
313
299
return ;
314
300
}
315
301
@@ -619,6 +605,7 @@ async function run(env: Env) {
619
605
getExistingDiscussions ( octokit , login ) ,
620
606
getExistingIssues ( octokit , login ) ,
621
607
] ) ;
608
+ console . log ( "existing issues found:" , issues ) ;
622
609
const { discussions : discussionsPlan , issues : issuesPlan } =
623
610
await buildUpdatePlan ( octokit , n2m , relevantPages , discussions , issues ) ;
624
611
0 commit comments