diff --git a/src/global.d.ts b/src/global.d.ts index a7979b7..0d9c8dc 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -9,7 +9,6 @@ export declare type Repository = { name: string; url: string; owner: Owner; - isArchived: boolean; primaryLanguage: PrimaryLanguage; codeOfConduct: CodeOfConduct; licenseInfo: LicenseInfo; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 8d26ec5..a3c1a53 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -11,8 +11,9 @@ import { goto } from '$app/navigation'; export let data: { data: SearchResponse; checked: boolean }; - const globalQuery = 'is:open label:"EddieHub:good-first-issue" no:assignee'; - const orgQuery = 'is:open label:"good first issue" org:EddieHubCommunity no:assignee'; + const globalQuery = 'is:open archived:false label:"EddieHub:good-first-issue" no:assignee'; + const orgQuery = + 'is:open archived:false label:"good first issue" org:EddieHubCommunity no:assignee'; let { checked } = data; let loadDisabled = false; diff --git a/src/routes/+page.ts b/src/routes/+page.ts index aafc210..a2fa449 100644 --- a/src/routes/+page.ts +++ b/src/routes/+page.ts @@ -7,8 +7,9 @@ export const load: Load = async ({ fetch, url, parent }) => { throw redirect(307, '/login'); } let globalParam = false; - const globalQuery = 'is:open label:"EddieHub:good-first-issue" no:assignee'; - const orgQuery = 'is:open label:"good first issue" org:EddieHubCommunity no:assignee'; + const globalQuery = 'is:open archived:false label:"EddieHub:good-first-issue" no:assignee'; + const orgQuery = + 'is:open archived:false label:"good first issue" org:EddieHubCommunity no:assignee'; try { globalParam = JSON.parse(url.searchParams.get('global') as string); diff --git a/src/routes/api/get-issues/+server.ts b/src/routes/api/get-issues/+server.ts index 4d5e13b..4a4f339 100644 --- a/src/routes/api/get-issues/+server.ts +++ b/src/routes/api/get-issues/+server.ts @@ -18,7 +18,7 @@ export const POST: RequestHandler = async ({ request }) => { const body = (await request.json()) as { query: string; after?: string }; const octokit = new Octokit({ auth: token }); - let { search }: Response = await octokit.graphql( + const { search }: Response = await octokit.graphql( `query EddieHubIssues($queryString: String!, $skip: Int!, $after: String) { search(first: $skip, query: $queryString, type: ISSUE, after: $after) { issueCount @@ -43,7 +43,6 @@ export const POST: RequestHandler = async ({ request }) => { repository { name url - isArchived primaryLanguage { color name @@ -74,10 +73,6 @@ export const POST: RequestHandler = async ({ request }) => { after: body.after, }, ); - - // filter out archived (read-only) repositories - search = { ...search, edges: search.edges.filter((edge) => !edge.node.repository.isArchived) }; - const labels = search.edges.map((el) => el.node.labels.edges.map((label) => label.node.name)); const merged = labels.reduce((acc, val) => { return acc.concat(val); diff --git a/src/stories/issue-card.story.svelte b/src/stories/issue-card.story.svelte index 17bafce..e0e5896 100644 --- a/src/stories/issue-card.story.svelte +++ b/src/stories/issue-card.story.svelte @@ -53,7 +53,6 @@ repository: { name: 'LinkFree', url: 'https://github.com/EddieHubCommunity/LinkFree', - isArchived: false, primaryLanguage: { color: '#f1e05a', name: 'JavaScript',