File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,11 @@ async function asanaOperations(
9
9
sectionName ,
10
10
taskComment
11
11
) {
12
- const client = asana . Client . create ( {
13
- defaultHeaders : { 'asana-enable' : 'new-sections,string_ids' } ,
14
- logAsanaChangeWarnings : false
15
- } ) . useAccessToken ( asanaPAT ) ;
16
-
17
12
try {
13
+ const client = asana . Client . create ( {
14
+ defaultHeaders : { 'asana-enable' : 'new-sections,string_ids' } ,
15
+ logAsanaChangeWarnings : false
16
+ } ) . useAccessToken ( asanaPAT ) ;
18
17
if ( sectionName ) {
19
18
let project = await client . sections . findByProject ( projectId ) ;
20
19
if ( project ) {
@@ -36,7 +35,7 @@ async function asanaOperations(
36
35
core . info ( 'Added the pull request link to the Asana task.' ) ;
37
36
}
38
37
} catch ( ex ) {
39
- core . error ( ex . value ) ;
38
+ console . error ( ex . value ) ;
40
39
}
41
40
}
42
41
53
52
let taskComment = null ,
54
53
parseAsanaURL = null ;
55
54
55
+ if ( ! ASANA_PAT ) {
56
+ throw ( { message : "ASANA PAT Not Found!" } ) ;
57
+ }
56
58
if ( TASK_COMMENT ) {
57
59
taskComment = `${ TASK_COMMENT } ${ PULL_REQUEST . html_url } ` ;
58
60
}
You can’t perform that action at this time.
0 commit comments