mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[Test Owners] Add script to get owners for files (#193277)
## Summary Node script to report ownership of a given file in our repo. The script's source of truth is `.github/CODEOWNERS`, which is generated by `@kbn/generate` In order to reach the goal of have zero files without code ownership, this is one small step along the way. ### To Test #### Happy Path `node scripts/get_owners_for_file.js --file packages/kbn-ace/src/ace/modes/index.ts` ``` succ elastic/kibana-management ``` #### Unknown Path `node scripts/get_owners_for_file.js --file some-file.txt` ``` ERROR Ownership of file [some-file.txt] is UNKNOWN ``` #### Error Path `node scripts/get_owners_for_file.js` ``` ERROR Missing --flag argument node scripts/get_owners_for_file.js Report file ownership from GitHub CODEOWNERS file. Options: --file Required, path to the file to report owners for. --verbose, -v Log verbosely --debug Log debug messages (less than verbose) --quiet Only log errors --silent Don't log anything --help Show this message ``` ### Notes Along with this small pr, next will be to ensure owners are assigned to all ES and KBN Archives. See more info in the link below: Contributes to: https://github.com/elastic/kibana/issues/192979 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
fd9691183e
commit
8a79173c4e
4 changed files with 54 additions and 6 deletions
11
scripts/get_owners_for_file.js
Normal file
11
scripts/get_owners_for_file.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
require('../src/setup_node_env');
|
||||
require('@kbn/code-owners').runGetOwnersForFileCli();
|
Loading…
Add table
Add a link
Reference in a new issue