11import { GITHUB_TOKEN , KV_REST_API_TOKEN , KV_REST_API_URL } from "$env/static/private" ;
2- import type { Repository as GQLRepository } from "@octokit/graphql-schema" ;
2+ import type {
3+ CommentAuthorAssociation ,
4+ Repository as GQLRepository
5+ } from "@octokit/graphql-schema" ;
36import { Redis } from "@upstash/redis" ;
47import { Octokit } from "octokit" ;
58import parseChangelog from "$lib/changelog-parser" ;
@@ -57,15 +60,6 @@ export type DiscussionDetails = {
5760 comments : DiscussionComment [ ] ;
5861} ;
5962
60- type AuthorAssociation =
61- | "OWNER"
62- | "MEMBER"
63- | "COLLABORATOR"
64- | "CONTRIBUTOR"
65- | "FIRST_TIMER"
66- | "FIRST_TIME_CONTRIBUTOR"
67- | "MANNEQUIN"
68- | "NONE" ;
6963type TeamDiscussion = Awaited <
7064 ReturnType < InstanceType < typeof Octokit > [ "rest" ] [ "teams" ] [ "listDiscussionsInOrg" ] >
7165> [ "data" ] [ number ] ;
@@ -93,7 +87,7 @@ export type Discussion = {
9387 state_reason : "resolved" | null ;
9488 locked : boolean ;
9589 comments : TeamDiscussion [ "comments_count" ] ;
96- author_association : AuthorAssociation ;
90+ author_association : CommentAuthorAssociation ;
9791 active_lock_reason : null ;
9892 timeline_url : string ;
9993} & Pick <
@@ -109,7 +103,7 @@ export type DiscussionComment = {
109103 child_comment_count : number ;
110104 repository_url : `${string } /${string } `;
111105 discussion_id : number ;
112- author_association : AuthorAssociation ;
106+ author_association : CommentAuthorAssociation ;
113107 user : TeamDiscussion [ "author" ] ;
114108} & Pick <
115109 TeamDiscussionComment ,
0 commit comments