mirror of
https://github.com/kiegroup/git-backporting.git
synced 2025-06-29 14:13:48 +00:00
feat: implement error notification as pr comment (#124)
* feat: implement error notification as pr comment * Update action.yml Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com> * feat: implement gitlab client and surround with try catch * docs: add error notification enablment in the doc * feat: disable comment if dry-run * feat: update the default comment on error --------- Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com>
This commit is contained in:
parent
6042bcc40b
commit
2bb7f73112
28 changed files with 594 additions and 39 deletions
|
@ -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);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue