@@ -14,10 +14,10 @@ const { fetchAndApplyOrgRules } = require('./lib/org-rules')
14
14
const registerWithDataDog = async ( apiKey , appKey , ddHost , configJsonStr ) => {
15
15
DatadogPostGovernor . increment ( )
16
16
17
- core . debug ( `JSON: ${ configJsonStr } ` )
17
+ core . debug ( `JSON: « ${ configJsonStr } » ` )
18
18
// Prep the auth
19
19
const client = new HttpClient (
20
- 'nodejs - GitHub Actions - arcxp/datadog-service-catalog-metadata-provider'
20
+ 'nodejs - GitHub Actions - arcxp/datadog-service-catalog-metadata-provider' ,
21
21
)
22
22
23
23
const response = await client . post (
@@ -27,15 +27,15 @@ const registerWithDataDog = async (apiKey, appKey, ddHost, configJsonStr) => {
27
27
'DD-API-KEY' : apiKey ,
28
28
'DD-APPLICATION-KEY' : appKey ,
29
29
'Content-Type' : 'application/json' ,
30
- }
30
+ } ,
31
31
)
32
32
const statusCode = response . message . statusCode
33
33
const body = await response . readBody ( )
34
34
core . debug ( `Response status code: ${ statusCode } , with body: ${ body } ` )
35
35
36
36
if ( statusCode !== 200 ) {
37
37
core . setFailed (
38
- `Failed to register service with DataDog. Status Code: ${ statusCode } Body: ${ body } `
38
+ `Failed to register service with DataDog. Status Code: ${ statusCode } Body: ${ body } ` ,
39
39
)
40
40
}
41
41
}
@@ -51,7 +51,7 @@ const run = async (configs) => {
51
51
52
52
if ( ! apiKey || ! appKey ) {
53
53
return core . setFailed (
54
- 'Both `datadog-key` and `datadog-app-key` are required.'
54
+ 'Both `datadog-key` and `datadog-app-key` are required.' ,
55
55
)
56
56
}
57
57
@@ -74,11 +74,12 @@ const run = async (configs) => {
74
74
75
75
// Grab the inputs and then run with them!
76
76
core . debug ( 'STARTING THE PARSE' )
77
- inputsToRegistryDocument ( )
77
+ Promise . resolve ( )
78
+ . then ( ( ) => inputsToRegistryDocument ( ) )
78
79
. then ( ( configs ) => {
79
80
core . debug ( `Input schema version is «${ core . getInput ( 'schema-version' ) } »` )
80
81
core . debug (
81
- `Inputs coming off of configs: ${ JSON . stringify ( configs , undefined , 2 ) } `
82
+ `Inputs coming off of configs: ${ JSON . stringify ( configs , undefined , 2 ) } ` ,
82
83
)
83
84
84
85
return configs
0 commit comments