@@ -221,45 +221,30 @@ async function getGitHubRepoUrl(): Promise<string | null> {
221221}
222222
223223async function getGitHubAuthor ( repoPath : string , commitHash : string ) : Promise < GitHubAuthor | null > {
224- console . log ( `[DEBUG] getGitHubAuthor called with repoPath=${ repoPath } , commitHash=${ commitHash } ` ) ;
225224 try {
226225 // Use gh CLI to fetch commit info from GitHub API
227- const cmd = `gh api repos/${ repoPath } /commits/${ commitHash } --jq '.author.login, .author.avatar_url, .author.html_url'` ;
228- console . log ( `[DEBUG] Running command: ${ cmd } ` ) ;
229226 const result = await $ `gh api repos/${ repoPath } /commits/${ commitHash } --jq '.author.login, .author.avatar_url, .author.html_url'` . quiet ( ) ;
230- const stdout = result . stdout . toString ( ) ;
231- const stderr = result . stderr . toString ( ) ;
232- console . log ( `[DEBUG] gh api stdout: ${ stdout } ` ) ;
233- console . log ( `[DEBUG] gh api stderr: ${ stderr } ` ) ;
234- const lines = stdout . trim ( ) . split ( "\n" ) ;
235- console . log ( `[DEBUG] Parsed lines: ${ JSON . stringify ( lines ) } ` ) ;
227+ const lines = result . stdout . toString ( ) . trim ( ) . split ( "\n" ) ;
236228
237229 if ( lines . length >= 3 && lines [ 0 ] && lines [ 1 ] && lines [ 2 ] ) {
238- const author = {
230+ return {
239231 login : lines [ 0 ] ,
240232 avatarUrl : lines [ 1 ] ,
241233 profileUrl : lines [ 2 ] ,
242234 } ;
243- console . log ( `[DEBUG] Returning author: ${ JSON . stringify ( author ) } ` ) ;
244- return author ;
245235 }
246- console . log ( `[DEBUG] Not enough lines or empty values, returning null` ) ;
247236 return null ;
248- } catch ( error ) {
249- console . log ( `[DEBUG] getGitHubAuthor error: ${ error } ` ) ;
237+ } catch {
250238 return null ;
251239 }
252240}
253241
254242async function getGitHistory ( filepath : string , repoPath : string | null ) : Promise < RFCGitInfo > {
255- console . log ( `[DEBUG] getGitHistory called with filepath=${ filepath } , repoPath=${ repoPath } ` ) ;
256243 try {
257244 const result = await $ `git log --follow --format=%H\ %aI -- ${ filepath } ` . quiet ( ) ;
258245 const lines = result . stdout . toString ( ) . trim ( ) . split ( "\n" ) . filter ( Boolean ) ;
259- console . log ( `[DEBUG] git log returned ${ lines . length } commits` ) ;
260246
261247 if ( lines . length === 0 ) {
262- console . log ( `[DEBUG] No commits found, returning nulls` ) ;
263248 return { accepted : null , lastUpdated : null , author : null } ;
264249 }
265250
@@ -272,11 +257,9 @@ async function getGitHistory(filepath: string, repoPath: string | null): Promise
272257
273258 const mostRecent = parseCommit ( lines [ 0 ] ! ) ;
274259 const oldest = parseCommit ( lines [ lines . length - 1 ] ! ) ;
275- console . log ( `[DEBUG] oldest commit hash: ${ oldest . hash } ` ) ;
276260
277261 // Fetch author info from the first commit
278262 const author = repoPath ? await getGitHubAuthor ( repoPath , oldest . hash ) : null ;
279- console . log ( `[DEBUG] author result: ${ JSON . stringify ( author ) } ` ) ;
280263
281264 // If only one commit, or same commit, don't show lastUpdated
282265 if ( lines . length === 1 || mostRecent . hash === oldest . hash ) {
@@ -354,7 +337,6 @@ async function build(liveReload: boolean = false): Promise<number> {
354337 const repoUrl = await getGitHubRepoUrl ( ) ;
355338 // Extract repo path (e.g., "vortex-data/rfcs") for API calls
356339 const repoPath = repoUrl ? repoUrl . replace ( "https://github.com/" , "" ) : null ;
357- console . log ( `[DEBUG] repoUrl=${ repoUrl } , repoPath=${ repoPath } ` ) ;
358340
359341 const glob = new Bun . Glob ( "*.md" ) ;
360342 const rfcs : RFC [ ] = [ ] ;
0 commit comments