mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
## Summary This PR adds a script that determines GitHub code ownership for functional test files in the Kibana repository. ### Why do we need this? We want to be able to determine test ownership to allow teams to get a better overview of their tests (number of tests, number of skipped tests, number of failures in the last x days, etc). ### What does this PR bring? This PR is a first step on closing the test ownership gaps. It adds functionality to determine the GitHub code owner for a given file (in the `@kbn/code-owners` package) and adds a script that makes use of this to check if all functional test files have a code owner, reporting the gaps. ### Future plans The idea is to include the test ownership information in our ingested test results, such that we can create dashboards, reports, etc based on it. At some point (once all ownership gaps are closed), we might consider running this check on CI to prevent new test files without owners. ### How to run? ``` node scripts/check_ftr_code_owners.js ``` The script lists the functional test files that are not covered by code owners and also gives a summary like this: ``` ERROR Found 2592 test files without code owner (checked 7550 test files in 12.73 s) ```
10 lines
438 B
JavaScript
10 lines
438 B
JavaScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
* Side Public License, v 1.
|
|
*/
|
|
|
|
require('../src/setup_node_env');
|
|
require('@kbn/test').runCheckFtrCodeOwnersCli();
|