[ci] Fix bad commit (#195892)

## Summary
Reverts #195891 , fixes prConfig type issue coming from #195581
This commit is contained in:
Alex Szabo 2024-10-11 13:19:34 +02:00 committed by GitHub
parent bde4064ba0
commit b05a3750ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,8 +20,8 @@ if (!prConfig) {
}
const GITHUB_PR_LABELS = process.env.GITHUB_PR_LABELS ?? '';
const REQUIRED_PATHS = prConfig.always_require_ci_on_changed.map((r) => new RegExp(r, 'i'));
const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed.map((r) => new RegExp(r, 'i'));
const REQUIRED_PATHS = prConfig.always_require_ci_on_changed!.map((r) => new RegExp(r, 'i'));
const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed!.map((r) => new RegExp(r, 'i'));
const getPipeline = (filename: string, removeSteps = true) => {
const str = fs.readFileSync(filename).toString();
@ -39,6 +39,9 @@ const getPipeline = (filename: string, removeSteps = true) => {
return;
}
pipeline.push(getAgentImageConfig({ returnYaml: true }));
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/base.yml', false));
if (await doAnyChangesMatch([/^packages\/kbn-handlebars/])) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/kbn_handlebars.yml'));
}