forked from tibdex/backport
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for skipping certain files for backporting (#4)
Signed-off-by: Kunal Kotwani <[email protected]> Signed-off-by: Kunal Kotwani <[email protected]>
- Loading branch information
1 parent
5b70a85
commit 058a08c
Showing
4 changed files
with
31 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* Get an array of files to be skipped from the backport PR. | ||
* Filtering out empty strings. | ||
*/ | ||
const getFilesToSkip = (input: string | undefined): string[] => { | ||
if (input === undefined || input === "") { | ||
return []; | ||
} | ||
|
||
const files_to_skip = input.split(","); | ||
return files_to_skip.map((v) => v.trim()).filter((v) => v !== ""); | ||
}; | ||
|
||
export { getFilesToSkip }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters