- detectThirdPartyRunnerProvider: env-var matrix + precedence ordering - verifyChecksum: bravo agentType branch, default branch, mismatches - buildBravoConfig: extracted as pure function; tests lock in the shape (no api_key, no customer, is_github_hosted=true, telemetry_url forwarded, one_time_key forwarded) that the server-side auth and correlation paths depend on Also capitalize the third-party provider name in the "Detected <X> runner environment" log line.
21 lines
724 B
TypeScript
21 lines
724 B
TypeScript
import { Configuration } from "./interfaces";
|
|
|
|
export function buildBravoConfig(confg: Configuration) {
|
|
return {
|
|
repo: confg.repo,
|
|
run_id: confg.run_id,
|
|
correlation_id: confg.correlation_id,
|
|
working_directory: confg.working_directory,
|
|
api_url: confg.api_url,
|
|
telemetry_url: confg.telemetry_url,
|
|
one_time_key: confg.one_time_key,
|
|
allowed_endpoints: confg.allowed_endpoints,
|
|
egress_policy: confg.egress_policy,
|
|
disable_telemetry: confg.disable_telemetry,
|
|
disable_sudo: confg.disable_sudo,
|
|
disable_sudo_and_containers: confg.disable_sudo_and_containers,
|
|
disable_file_monitoring: confg.disable_file_monitoring,
|
|
private: confg.private,
|
|
is_github_hosted: true,
|
|
};
|
|
}
|