@@ -19,6 +19,7 @@ import {
19
19
createStatusReportBase ,
20
20
getActionsStatus ,
21
21
sendStatusReport ,
22
+ StatusReportBase ,
22
23
} from "./status-report" ;
23
24
import * as util from "./util" ;
24
25
@@ -89,7 +90,17 @@ function generateCertificateAuthority(): CertificateAuthority {
89
90
return { cert : pem , key } ;
90
91
}
91
92
92
- async function sendSuccessStatusReport ( startedAt : Date , logger : Logger ) {
93
+ interface StartProxyStatus extends StatusReportBase {
94
+ // A comma-separated list of registry types which are configured for CodeQL.
95
+ // This only includes registry types we support, not all that are configured.
96
+ registry_types : string ;
97
+ }
98
+
99
+ async function sendSuccessStatusReport (
100
+ startedAt : Date ,
101
+ registry_types : string [ ] ,
102
+ logger : Logger ,
103
+ ) {
93
104
const statusReportBase = await createStatusReportBase (
94
105
ActionName . StartProxy ,
95
106
"success" ,
@@ -99,7 +110,11 @@ async function sendSuccessStatusReport(startedAt: Date, logger: Logger) {
99
110
logger ,
100
111
) ;
101
112
if ( statusReportBase !== undefined ) {
102
- await sendStatusReport ( statusReportBase ) ;
113
+ const statusReport : StartProxyStatus = {
114
+ ...statusReportBase ,
115
+ registry_types : registry_types . join ( "," ) ,
116
+ } ;
117
+ await sendStatusReport ( statusReport ) ;
103
118
}
104
119
}
105
120
@@ -148,7 +163,11 @@ async function runWrapper() {
148
163
await startProxy ( proxyBin , proxyConfig , proxyLogFilePath , logger ) ;
149
164
150
165
// Report success if we have reached this point.
151
- await sendSuccessStatusReport ( startedAt , logger ) ;
166
+ await sendSuccessStatusReport (
167
+ startedAt ,
168
+ proxyConfig . all_credentials . map ( ( c ) => c . type ) ,
169
+ logger ,
170
+ ) ;
152
171
} catch ( unwrappedError ) {
153
172
const error = util . wrapError ( unwrappedError ) ;
154
173
core . setFailed ( `start-proxy action failed: ${ error . message } ` ) ;
0 commit comments