-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathcodeowners.d.ts
More file actions
29 lines (26 loc) · 789 Bytes
/
codeowners.d.ts
File metadata and controls
29 lines (26 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
interface Codeowners {
/**
* Searches upwards for a codeowners file either in a direct
* parent or within a docs/ or .github/ or .gitlab/ folder in a parent
* folder of the cwd.
* @param cwd current directory, defaults to process.cwd()
*/
new(cwd?: string, fileName?: string): CodeownersFile;
}
interface CodeownersFile {
/**
* The codeowners file found as a parent of the cwd
*/
readonly codeownersFilePath: string;
/**
* The assumed project directory root for paths within the codeowners file
*/
readonly codeownersDirectory: string;
/**
* Get a list of owner(s) for a given file/folder path
* @param filePath relative to the codeownersDirectory
*/
getOwner(filePath: string): string[];
}
declare const co: Codeowners;
export = co;