File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Add the following code into your workflow:
1616
1717``` yml
1818- name : Readable Readme
19- uses : tianhaoz95/readable-readme@v0.2 .0-alpha
19+ uses : tianhaoz95/readable-readme@v1.0 .0-alpha
2020 with :
2121 token : ${{ secrets.TEST_GITHUB_TOKEN }}
2222` ` `
Original file line number Diff line number Diff line change @@ -276,8 +276,15 @@ export function rrlog(logMsg: string): void {
276276 */
277277export function getReadmeIgnoreList ( filename : string ) : string [ ] {
278278 // TODO(tianhaoz95): add test for this.
279- const ignoreContent : string = readFileContent ( filename ) ;
280- const ignoreList : string [ ] = ignoreContent . split ( "\n" ) ;
279+ let ignoreContent : string = "" ;
280+ let ignoreList : string [ ] = [ ] ;
281+ try {
282+ ignoreContent = readFileContent ( filename ) ;
283+ ignoreList = ignoreContent . split ( "\n" ) ;
284+ } catch ( err ) {
285+ rrlog ( "Ignore file not found" ) ;
286+ ignoreList = [ ] ;
287+ }
281288 const sanitizedIgnoreList : string [ ] = [ ] ;
282289 for ( const ignoreEntry of ignoreList ) {
283290 if ( ignoreEntry . length > 0 ) {
You can’t perform that action at this time.
0 commit comments