feat(issue-17): override backporting pr data (#29)

This commit is contained in:
Andrea Lamparelli 2023-06-20 22:29:52 +02:00 committed by GitHub
parent 1732481b37
commit 941beda208
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 279 additions and 30 deletions

View file

@ -28,6 +28,10 @@ describe("gha args parser", () => {
expect(args.folder).toEqual(undefined);
expect(args.targetBranch).toEqual("target");
expect(args.pullRequest).toEqual("https://localhost/whatever/pulls/1");
expect(args.title).toEqual(undefined);
expect(args.body).toEqual(undefined);
expect(args.bodyPrefix).toEqual(undefined);
expect(args.bpBranchName).toEqual(undefined);
});
test("valid execution [override]", () => {
@ -35,7 +39,11 @@ describe("gha args parser", () => {
"dry-run": "true",
"auth": "bearer-token",
"target-branch": "target",
"pull-request": "https://localhost/whatever/pulls/1"
"pull-request": "https://localhost/whatever/pulls/1",
"title": "New Title",
"body": "New Body",
"body-prefix": "New Body Prefix",
"bp-branch-name": "bp_branch_name",
});
const args: Args = parser.parse();
@ -45,6 +53,10 @@ describe("gha args parser", () => {
expect(args.folder).toEqual(undefined);
expect(args.targetBranch).toEqual("target");
expect(args.pullRequest).toEqual("https://localhost/whatever/pulls/1");
expect(args.title).toEqual("New Title");
expect(args.body).toEqual("New Body");
expect(args.bodyPrefix).toEqual("New Body Prefix");
expect(args.bpBranchName).toEqual("bp_branch_name");
});
});