File tree Expand file tree Collapse file tree 6 files changed +25
-8
lines changed
Expand file tree Collapse file tree 6 files changed +25
-8
lines changed Original file line number Diff line number Diff line change @@ -32,3 +32,7 @@ labels:
3232 issue :
3333 body : This issue or pull request already exists.
3434 action : close
35+ - name : good first issue
36+ labeled :
37+ issue :
38+ body : This issue is easy for contributing. Everyone can work on this.
Original file line number Diff line number Diff line change 2222 uses : peaceiris/actions-label-commenter@v1
2323 with :
2424 github_token : ${{ secrets.GITHUB_TOKEN }}
25- # config_file: .github/commenter.yml
25+ # config_file: .github/label- commenter-config .yml
Original file line number Diff line number Diff line change 4949 uses : peaceiris/actions-label-commenter@v1
5050 with :
5151 github_token : ${{ secrets.GITHUB_TOKEN }}
52- # config_file: .github/commenter.yml
52+ # config_file: .github/label- commenter-config .yml
5353```
5454
5555### Action Setting
@@ -91,6 +91,10 @@ labels:
9191 issue :
9292 body : This issue or pull request already exists.
9393 action : close
94+ - name : good first issue
95+ labeled :
96+ issue :
97+ body : This issue is easy for contributing. Everyone can work on this.
9498` ` `
9599
96100
Original file line number Diff line number Diff line change @@ -31,16 +31,19 @@ describe('getInputs()', () => {
3131 const inps : Inputs = getInputs ( ) ;
3232
3333 expect ( inps . GithubToken ) . toMatch ( 'secret_token' ) ;
34- expect ( inps . ConfigFilePath ) . toMatch ( '.github/commenter.yml' ) ;
34+ expect ( inps . ConfigFilePath ) . toMatch ( '.github/label- commenter-config .yml' ) ;
3535 } ) ;
3636
3737 test ( 'get spec inputs' , ( ) => {
3838 process . env [ 'INPUT_GITHUB_TOKEN' ] = 'secret_token' ;
39- process . env [ 'INPUT_CONFIG_FILE' ] = '.github/config/commenter.yml' ;
39+ process . env [ 'INPUT_CONFIG_FILE' ] =
40+ '.github/config/label-commenter-config.yml' ;
4041
4142 const inps : Inputs = getInputs ( ) ;
4243
4344 expect ( inps . GithubToken ) . toMatch ( 'secret_token' ) ;
44- expect ( inps . ConfigFilePath ) . toMatch ( '.github/config/commenter.yml' ) ;
45+ expect ( inps . ConfigFilePath ) . toMatch (
46+ '.github/config/label-commenter-config.yml'
47+ ) ;
4548 } ) ;
4649} ) ;
Original file line number Diff line number Diff line change 77 required : true
88 config_file :
99 description : ' Path to action setting file'
10- default : ' .github/commenter.yml'
10+ default : ' .github/label- commenter-config .yml'
1111 required : false
1212runs :
1313 using : ' node12'
Original file line number Diff line number Diff line change @@ -77,12 +77,14 @@ export async function run(): Promise<void> {
7777 } ) ;
7878
7979 if ( ! isExistLabel ) {
80- core . info ( `[INFO] no configuration for ${ labelName } ` ) ;
80+ core . info ( `[INFO] no configuration for labels. ${ labelName } ` ) ;
8181 return ;
8282 }
8383
8484 if ( config . labels [ labelIndex ] [ `${ labelEvent } ` ] === void 0 ) {
85- core . info ( `[INFO] no configuration for ${ labelName } ${ labelEvent } ` ) ;
85+ core . info (
86+ `[INFO] no configuration for labels.${ labelName } .${ labelEvent } `
87+ ) ;
8688 return ;
8789 }
8890
@@ -131,6 +133,10 @@ export async function run(): Promise<void> {
131133 await closeIssue ( githubClient , issueNumber ) ;
132134 } else if ( finalAction === 'open' ) {
133135 await openIssue ( githubClient , issueNumber ) ;
136+ } else {
137+ core . info (
138+ `[INFO] no configuration for labels.${ labelName } .${ labelEvent } .${ eventType } .action`
139+ ) ;
134140 }
135141
136142 return ;
You can’t perform that action at this time.
0 commit comments