feat: implement error notification as pr comment

This commit is contained in:
Andrea Lamparelli 2024-04-04 21:42:31 +02:00
parent 6042bcc40b
commit c02522a9f1
27 changed files with 432 additions and 35 deletions

View file

@ -295,7 +295,6 @@ describe("gha args parser", () => {
expect(args.cherryPickOptions).toEqual(undefined);
});
test("invalid execution with empty target branch", () => {
spyGetInput({
"target-branch": " ",
@ -320,4 +319,15 @@ describe("gha args parser", () => {
expect(() => parser.parse()).toThrowError("Missing option: pull request must be provided");
});
test("enable error notification flag", () => {
spyGetInput({
"target-branch": "target,old",
"pull-request": "https://localhost/whatever/pulls/1",
"enable-err-notification": "true"
});
const args: Args = parser.parse();
expect(args.enableErrorNotification).toEqual(true);
});
});