mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
[codeowners] Filter kibanamachine (#199404)
Currently we remove CODEOWNERS on backport branches to avoid review assignments: reviews were already collected on the source pull request. If there's a conflict, it will go through another round of review but not require all the original assignees. We want to re-add the file for our own tooling, and to avoid CODEOWNERS merge conflicts on backports. To do this, we're going to add a global override to code assignments on backport branches. This updates our CODEOWNERS libraries to ignore assignments to `kibanamachine`. --------- Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
This commit is contained in:
parent
61cc4129a3
commit
a26f5d8b61
3 changed files with 8 additions and 4 deletions
|
@ -39,7 +39,9 @@ export function getPathsWithOwnersReversed(): PathWithOwners[] {
|
|||
const codeownersLines = codeownersContent.split(/\r?\n/);
|
||||
const codeowners = codeownersLines
|
||||
.map((line) => line.trim())
|
||||
.filter((line) => line && line[0] !== '#');
|
||||
.filter((line) => line && line[0] !== '#')
|
||||
// kibanamachine is an assignment override on backport branches to avoid review requests
|
||||
.filter((line) => line && !line.includes('@kibanamachine'));
|
||||
|
||||
const pathsWithOwners: PathWithOwners[] = codeowners.map((c) => {
|
||||
const [path, ...ghTeams] = c.split(/\s+/);
|
||||
|
|
|
@ -78,7 +78,8 @@ export async function migratePluginsToPackages(legacyManifests: RepoPath[]) {
|
|||
.split('\n')
|
||||
.flatMap((line) => {
|
||||
const trim = line.trim();
|
||||
if (!trim || trim.startsWith('#')) {
|
||||
// kibanamachine is an assignment override on backport branches to avoid review requests
|
||||
if (!trim || trim.startsWith('#') || trim.includes('@kibanamachine')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
|
@ -13,8 +13,9 @@ import { pipe } from '../utils';
|
|||
|
||||
const allLines$ = (lineReader) =>
|
||||
fromEvent(lineReader, 'line').pipe(
|
||||
filter(function dropEmptiesAndDropComments(x) {
|
||||
return x !== '' && !/^#\s{1,3}/.test(x);
|
||||
filter(function dropEmptiesAndDropCommentsAndDropKibanamachine(x) {
|
||||
// kibanamachine is an assignment override on backport branches to avoid review requests
|
||||
return x !== '' && !/^#\s{1,3}/.test(x) && !x.includes('@kibanamachine');
|
||||
}),
|
||||
map(pipe(dropCCDelim, pathAndTeams)),
|
||||
takeUntil(fromEvent(lineReader, 'close'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue