File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -17,19 +17,32 @@ const main = async () => {
1717 if ( ! context . actor . match ( allowed_usernames ) ) {
1818 core . warning ( 'Ignored, the username does not match.' ) ;
1919 return ;
20+ } else {
21+ core . info ( 'Username matched.' ) ;
2022 }
23+
2124 const pullRequest = await octokit . pulls . get ( {
2225 ...context . repo ,
2326 ...context . owner ,
2427 pull_number : number
2528 } ) ;
2629
30+ if ( pullRequest . data . state === 'closed' ) {
31+ core . warning ( 'Ignored, the pull-request is closed.' ) ;
32+ return ;
33+ } else {
34+ core . info ( 'The pull-request is open.' ) ;
35+ }
36+
2737 if ( pullRequest . data . labels . indexOf ( filter_label ) !== - 1 ) {
2838 core . warning ( 'Ignored, the label does not exist on the pull-request.' ) ;
2939 return ;
40+ } else {
41+ core . info ( 'Label matched.' ) ;
3042 }
3143
3244 if ( merge_method === 'fast-forward' ) {
45+ core . info ( 'Updating to: ' + pullRequest . data . base . ref + '@' + pullRequest . data . head . sha ) ;
3346 await octokit . git . updateRef ( {
3447 force : false ,
3548 ...context . repo ,
You can’t perform that action at this time.
0 commit comments