mirror of
https://code.forgejo.org/actions/git-backporting.git
synced 2025-05-16 02:29:12 -04:00
feat(issue-17): override backporting pr data (#29)
This commit is contained in:
parent
1732481b37
commit
941beda208
15 changed files with 279 additions and 30 deletions
|
@ -28,6 +28,10 @@ describe("cli 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 [default, long]", () => {
|
||||
|
@ -45,6 +49,10 @@ describe("cli 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, short]", () => {
|
||||
|
@ -65,6 +73,10 @@ describe("cli 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, long]", () => {
|
||||
|
@ -75,7 +87,15 @@ describe("cli args parser", () => {
|
|||
"--target-branch",
|
||||
"target",
|
||||
"--pull-request",
|
||||
"https://localhost/whatever/pulls/1"
|
||||
"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();
|
||||
|
@ -85,6 +105,10 @@ describe("cli 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");
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue