Merge pull request #19472 from backstage/repo-tools/pick-first-owner
[repo-tools] Default created entities to using the first listed `CODEOWNER` as owner
This commit is contained in:
@@ -59,7 +59,7 @@ export function getOwnerFromCodeowners(
|
||||
): string {
|
||||
const relPath = relativePath('.', absPath);
|
||||
const possibleOwners = getPossibleCodeowners(codeowners, relPath);
|
||||
const owner = possibleOwners.slice(-1)[0];
|
||||
const owner = possibleOwners[0];
|
||||
|
||||
if (!owner) {
|
||||
throw new Error(`${relPath} isn't owned by anyone in CODEOWNERS`);
|
||||
|
||||
Reference in New Issue
Block a user