File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,9 @@ module.exports = async function action() {
86
86
switch ( ACTION ) {
87
87
case 'assert-link' : {
88
88
const githubToken = core . getInput ( 'github-token' , { required : true } ) ;
89
+ const linkRequired = core . getInput ( 'link-required' , { required : true } ) === 'true' ;
89
90
const octokit = new github . GitHub ( githubToken ) ;
90
- const statusState = ( foundAsanaTasks . length > 0 ) ? 'success' : 'error' ;
91
+ const statusState = ( ! linkRequired || foundAsanaTasks . length > 0 ) ? 'success' : 'error' ;
91
92
core . info ( `setting ${ statusState } for ${ github . context . payload . pull_request . head . sha } ` ) ;
92
93
octokit . repos . createStatus ( {
93
94
...github . context . repo ,
@@ -144,7 +145,6 @@ module.exports = async function action() {
144
145
return movedTasks ;
145
146
}
146
147
default :
147
- console . info ( 'lame' ) ;
148
148
core . setFailed ( "unexpected action ${ACTION}" ) ;
149
149
}
150
150
}
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ describe('asana github actions', () => {
43
43
inputs = {
44
44
'asana-pat' : asanaPAT ,
45
45
'action' : 'assert-link' ,
46
+ 'link-required' : 'true' ,
46
47
'github-token' : 'fake'
47
48
}
48
49
github . context . payload = {
You can’t perform that action at this time.
0 commit comments