File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import * as github from '@actions/github'
33import { readFile , writeFile } from 'fs-extra' ;
44import { Client } from 'codemaker-sdk' ;
55import { commitAndPushSingleFile , getReviewComments } from './utils/githubUtils' ;
6- import { langFromFileExtension } from './utils/languageUtils' ;
6+ import { isFileSupported , langFromFileExtension } from './utils/languageUtils' ;
77import { createProcessRequest , processTask } from './utils/codemakerUtils' ;
88import { lineNumber , orderComments } from "./utils/commentUtils" ;
99
@@ -31,6 +31,11 @@ export const runAction = async () => {
3131 for ( let i = 0 ; i < comments . length ; i ++ ) {
3232 const comment = comments [ i ] ;
3333 const path = comment . path ;
34+ if ( ! isFileSupported ( path ) ) {
35+ console . log ( `Skipping unsupported file ${ path } ` ) ;
36+ continue ;
37+ }
38+
3439 const line = lineNumber ( comment ) ;
3540 const language = langFromFileExtension ( path ) ;
3641 console . log ( `Running code generation for file ${ path } . Language detected: ${ language } . Line number: ${ line } . Prompt: ${ comment . body } ` ) ;
You can’t perform that action at this time.
0 commit comments