mirror of
https://code.forgejo.org/actions/git-backporting.git
synced 2025-05-18 11:39:12 -04:00
feat(issue-54): backport pr commits without squash (#55)
* feat(issue-54): backport pr commits without squash fix https://github.com/kiegroup/git-backporting/issues/54 * feat(issue-54): fixed readme
This commit is contained in:
parent
a737aa7c4c
commit
c4dbb26c1d
29 changed files with 990 additions and 145 deletions
|
@ -76,6 +76,7 @@ describe("cli args parser", () => {
|
|||
expect(args.inheritReviewers).toEqual(true);
|
||||
expect(args.labels).toEqual([]);
|
||||
expect(args.inheritLabels).toEqual(false);
|
||||
expect(args.squash).toEqual(true);
|
||||
});
|
||||
|
||||
test("with config file [default, short]", () => {
|
||||
|
@ -101,6 +102,7 @@ describe("cli args parser", () => {
|
|||
expect(args.inheritReviewers).toEqual(true);
|
||||
expect(args.labels).toEqual([]);
|
||||
expect(args.inheritLabels).toEqual(false);
|
||||
expect(args.squash).toEqual(true);
|
||||
});
|
||||
|
||||
test("valid execution [default, long]", () => {
|
||||
|
@ -128,6 +130,7 @@ describe("cli args parser", () => {
|
|||
expect(args.inheritReviewers).toEqual(true);
|
||||
expect(args.labels).toEqual([]);
|
||||
expect(args.inheritLabels).toEqual(false);
|
||||
expect(args.squash).toEqual(true);
|
||||
});
|
||||
|
||||
test("with config file [default, long]", () => {
|
||||
|
@ -153,6 +156,7 @@ describe("cli args parser", () => {
|
|||
expect(args.inheritReviewers).toEqual(true);
|
||||
expect(args.labels).toEqual([]);
|
||||
expect(args.inheritLabels).toEqual(false);
|
||||
expect(args.squash).toEqual(true);
|
||||
});
|
||||
|
||||
test("valid execution [override, short]", () => {
|
||||
|
@ -187,6 +191,7 @@ describe("cli args parser", () => {
|
|||
expect(args.inheritReviewers).toEqual(true);
|
||||
expect(args.labels).toEqual([]);
|
||||
expect(args.inheritLabels).toEqual(false);
|
||||
expect(args.squash).toEqual(true);
|
||||
});
|
||||
|
||||
test("valid execution [override, long]", () => {
|
||||
|
@ -237,6 +242,7 @@ describe("cli args parser", () => {
|
|||
expect(args.inheritReviewers).toEqual(false);
|
||||
expectArrayEqual(args.labels!, ["cherry-pick :cherries:", "another spaced label"]);
|
||||
expect(args.inheritLabels).toEqual(true);
|
||||
expect(args.squash).toEqual(true);
|
||||
});
|
||||
|
||||
test("override using config file", () => {
|
||||
|
@ -262,6 +268,7 @@ describe("cli args parser", () => {
|
|||
expect(args.inheritReviewers).toEqual(true);
|
||||
expectArrayEqual(args.labels!, ["cherry-pick :cherries:"]);
|
||||
expect(args.inheritLabels).toEqual(true);
|
||||
expect(args.squash).toEqual(true);
|
||||
});
|
||||
|
||||
test("ignore custom option when config file is set", () => {
|
||||
|
@ -314,5 +321,35 @@ describe("cli args parser", () => {
|
|||
expect(args.inheritReviewers).toEqual(true);
|
||||
expectArrayEqual(args.labels!, ["cherry-pick :cherries:"]);
|
||||
expect(args.inheritLabels).toEqual(true);
|
||||
expect(args.squash).toEqual(true);
|
||||
});
|
||||
|
||||
test("override squash to false", () => {
|
||||
addProcessArgs([
|
||||
"--target-branch",
|
||||
"target",
|
||||
"--pull-request",
|
||||
"https://localhost/whatever/pulls/1",
|
||||
"--no-squash"
|
||||
]);
|
||||
|
||||
const args: Args = parser.parse();
|
||||
expect(args.dryRun).toEqual(false);
|
||||
expect(args.auth).toEqual(undefined);
|
||||
expect(args.gitUser).toEqual(undefined);
|
||||
expect(args.gitEmail).toEqual(undefined);
|
||||
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);
|
||||
expect(args.reviewers).toEqual([]);
|
||||
expect(args.assignees).toEqual([]);
|
||||
expect(args.inheritReviewers).toEqual(true);
|
||||
expect(args.labels).toEqual([]);
|
||||
expect(args.inheritLabels).toEqual(false);
|
||||
expect(args.squash).toEqual(false);
|
||||
});
|
||||
});
|
|
@ -48,10 +48,6 @@ describe("gha args parser", () => {
|
|||
parser = new GHAArgsParser();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
test("valid execution [default]", () => {
|
||||
spyGetInput({
|
||||
"target-branch": "target",
|
||||
|
@ -73,6 +69,7 @@ describe("gha args parser", () => {
|
|||
expect(args.inheritReviewers).toEqual(true);
|
||||
expect(args.labels).toEqual([]);
|
||||
expect(args.inheritLabels).toEqual(false);
|
||||
expect(args.squash).toEqual(true);
|
||||
});
|
||||
|
||||
test("valid execution [override]", () => {
|
||||
|
@ -111,6 +108,7 @@ describe("gha args parser", () => {
|
|||
expect(args.inheritReviewers).toEqual(false);
|
||||
expectArrayEqual(args.labels!, ["cherry-pick :cherries:", "another spaced label"]);
|
||||
expect(args.inheritLabels).toEqual(true);
|
||||
expect(args.squash).toEqual(true);
|
||||
});
|
||||
|
||||
test("using config file", () => {
|
||||
|
@ -135,6 +133,7 @@ describe("gha args parser", () => {
|
|||
expect(args.inheritReviewers).toEqual(true);
|
||||
expectArrayEqual(args.labels!, []);
|
||||
expect(args.inheritLabels).toEqual(false);
|
||||
expect(args.squash).toEqual(true);
|
||||
});
|
||||
|
||||
test("ignore custom options when using config file", () => {
|
||||
|
@ -174,5 +173,31 @@ describe("gha args parser", () => {
|
|||
expect(args.inheritReviewers).toEqual(true);
|
||||
expectArrayEqual(args.labels!, ["cherry-pick :cherries:"]);
|
||||
expect(args.inheritLabels).toEqual(true);
|
||||
expect(args.squash).toEqual(true);
|
||||
});
|
||||
|
||||
test("override squash to false", () => {
|
||||
spyGetInput({
|
||||
"target-branch": "target",
|
||||
"pull-request": "https://localhost/whatever/pulls/1",
|
||||
"no-squash": "true",
|
||||
});
|
||||
|
||||
const args: Args = parser.parse();
|
||||
expect(args.dryRun).toEqual(false);
|
||||
expect(args.auth).toEqual(undefined);
|
||||
expect(args.gitUser).toEqual(undefined);
|
||||
expect(args.gitEmail).toEqual(undefined);
|
||||
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.reviewers).toEqual([]);
|
||||
expect(args.assignees).toEqual([]);
|
||||
expect(args.inheritReviewers).toEqual(true);
|
||||
expect(args.labels).toEqual([]);
|
||||
expect(args.inheritLabels).toEqual(false);
|
||||
expect(args.squash).toEqual(false);
|
||||
});
|
||||
});
|
|
@ -5,8 +5,10 @@ import GitClientFactory from "@bp/service/git/git-client-factory";
|
|||
import { GitClientType } from "@bp/service/git/git.types";
|
||||
import { mockGitHubClient } from "../../../support/mock/git-client-mock-support";
|
||||
import { addProcessArgs, createTestFile, removeTestFile, resetProcessArgs } from "../../../support/utils";
|
||||
import { mergedPullRequestFixture, openPullRequestFixture, notMergedPullRequestFixture, repo, targetOwner } from "../../../support/mock/github-data";
|
||||
import { mergedPullRequestFixture, openPullRequestFixture, notMergedPullRequestFixture, repo, targetOwner, multipleCommitsPullRequestFixture } from "../../../support/mock/github-data";
|
||||
import CLIArgsParser from "@bp/service/args/cli/cli-args-parser";
|
||||
import GitHubMapper from "@bp/service/git/github/github-mapper";
|
||||
import GitHubClient from "@bp/service/git/github/github-client";
|
||||
|
||||
const GITHUB_MERGED_PR_SIMPLE_CONFIG_FILE_CONTENT_PATHNAME = "./github-pr-configs-parser-simple-pr-merged.json";
|
||||
const GITHUB_MERGED_PR_SIMPLE_CONFIG_FILE_CONTENT = {
|
||||
|
@ -32,11 +34,15 @@ const GITHUB_MERGED_PR_COMPLEX_CONFIG_FILE_CONTENT = {
|
|||
"inheritLabels": true,
|
||||
};
|
||||
|
||||
jest.spyOn(GitHubMapper.prototype, "mapPullRequest");
|
||||
jest.spyOn(GitHubClient.prototype, "getPullRequest");
|
||||
|
||||
describe("github pull request config parser", () => {
|
||||
|
||||
const mergedPRUrl = `https://github.com/${targetOwner}/${repo}/pull/${mergedPullRequestFixture.number}`;
|
||||
const openPRUrl = `https://github.com/${targetOwner}/${repo}/pull/${openPullRequestFixture.number}`;
|
||||
const notMergedPRUrl = `https://github.com/${targetOwner}/${repo}/pull/${notMergedPullRequestFixture.number}`;
|
||||
const multipleCommitsPRUrl = `https://github.com/${targetOwner}/${repo}/pull/${multipleCommitsPullRequestFixture.number}`;
|
||||
|
||||
let argsParser: CLIArgsParser;
|
||||
let configParser: PullRequestConfigsParser;
|
||||
|
@ -67,10 +73,6 @@ describe("github pull request config parser", () => {
|
|||
configParser = new PullRequestConfigsParser();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
test("parse configs from pull request", async () => {
|
||||
const args: Args = {
|
||||
dryRun: false,
|
||||
|
@ -86,6 +88,11 @@ describe("github pull request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledWith("owner", "reponame", 2368, true);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "GitHub",
|
||||
|
@ -184,6 +191,11 @@ describe("github pull request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledWith("owner", "reponame", 4444, true);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(true);
|
||||
expect(configs.auth).toEqual("whatever");
|
||||
expect(configs.targetBranch).toEqual("prod");
|
||||
|
@ -234,10 +246,9 @@ describe("github pull request config parser", () => {
|
|||
inheritReviewers: true,
|
||||
};
|
||||
|
||||
expect(async () => await configParser.parseAndValidate(args)).rejects.toThrow("Provided pull request is closed and not merged!");
|
||||
await expect(() => configParser.parseAndValidate(args)).rejects.toThrow("Provided pull request is closed and not merged!");
|
||||
});
|
||||
|
||||
|
||||
test("override backport pr data inheriting reviewers", async () => {
|
||||
const args: Args = {
|
||||
dryRun: false,
|
||||
|
@ -256,6 +267,11 @@ describe("github pull request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledWith("owner", "reponame", 2368, true);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "Me",
|
||||
|
@ -332,6 +348,11 @@ describe("github pull request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledWith("owner", "reponame", 2368, true);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "Me",
|
||||
|
@ -408,6 +429,11 @@ describe("github pull request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledWith("owner", "reponame", 2368, true);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "Me",
|
||||
|
@ -486,6 +512,11 @@ describe("github pull request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledWith("owner", "reponame", 2368, true);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "Me",
|
||||
|
@ -553,6 +584,11 @@ describe("github pull request config parser", () => {
|
|||
const args: Args = argsParser.parse();
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledWith("owner", "reponame", 2368, true);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "GitHub",
|
||||
|
@ -619,6 +655,11 @@ describe("github pull request config parser", () => {
|
|||
const args: Args = argsParser.parse();
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledWith("owner", "reponame", 2368, true);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "Me",
|
||||
|
@ -676,4 +717,82 @@ describe("github pull request config parser", () => {
|
|||
bpBranchName: undefined,
|
||||
});
|
||||
});
|
||||
|
||||
test("parse configs from pull request without squashing with multiple commits", async () => {
|
||||
const args: Args = {
|
||||
dryRun: false,
|
||||
auth: "",
|
||||
pullRequest: multipleCommitsPRUrl,
|
||||
targetBranch: "prod",
|
||||
gitUser: "GitHub",
|
||||
gitEmail: "noreply@github.com",
|
||||
reviewers: [],
|
||||
assignees: [],
|
||||
inheritReviewers: true,
|
||||
squash: false,
|
||||
};
|
||||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubClient.prototype.getPullRequest).toBeCalledWith("owner", "reponame", 8632, false);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), ["0404fb922ab75c3a8aecad5c97d9af388df04695", "11da4e38aa3e577ffde6d546f1c52e53b04d3151"]);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "GitHub",
|
||||
email: "noreply@github.com"
|
||||
});
|
||||
expect(configs.auth).toEqual("");
|
||||
expect(configs.targetBranch).toEqual("prod");
|
||||
expect(configs.folder).toEqual(process.cwd() + "/bp");
|
||||
expect(configs.originalPullRequest).toEqual({
|
||||
number: 8632,
|
||||
author: "gh-user",
|
||||
url: "https://api.github.com/repos/owner/reponame/pulls/8632",
|
||||
htmlUrl: "https://github.com/owner/reponame/pull/8632",
|
||||
state: "closed",
|
||||
merged: true,
|
||||
mergedBy: "that-s-a-user",
|
||||
title: "PR Title",
|
||||
body: "Please review and merge",
|
||||
reviewers: ["requested-gh-user", "gh-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
targetRepo: {
|
||||
owner: "owner",
|
||||
project: "reponame",
|
||||
cloneUrl: "https://github.com/owner/reponame.git"
|
||||
},
|
||||
sourceRepo: {
|
||||
owner: "owner",
|
||||
project: "reponame",
|
||||
cloneUrl: "https://github.com/owner/reponame.git"
|
||||
},
|
||||
nCommits: 2,
|
||||
commits: ["0404fb922ab75c3a8aecad5c97d9af388df04695", "11da4e38aa3e577ffde6d546f1c52e53b04d3151"]
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "GitHub",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
title: "[prod] PR Title",
|
||||
body: "**Backport:** https://github.com/owner/reponame/pull/8632\r\n\r\nPlease review and merge",
|
||||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
targetRepo: {
|
||||
owner: "owner",
|
||||
project: "reponame",
|
||||
cloneUrl: "https://github.com/owner/reponame.git"
|
||||
},
|
||||
sourceRepo: {
|
||||
owner: "owner",
|
||||
project: "reponame",
|
||||
cloneUrl: "https://github.com/owner/reponame.git"
|
||||
},
|
||||
bpBranchName: undefined,
|
||||
});
|
||||
});
|
||||
});
|
|
@ -7,6 +7,8 @@ import { getAxiosMocked } from "../../../support/mock/git-client-mock-support";
|
|||
import { CLOSED_NOT_MERGED_MR, MERGED_SQUASHED_MR, OPEN_MR } from "../../../support/mock/gitlab-data";
|
||||
import GHAArgsParser from "@bp/service/args/gha/gha-args-parser";
|
||||
import { createTestFile, removeTestFile, spyGetInput } from "../../../support/utils";
|
||||
import GitLabClient from "@bp/service/git/gitlab/gitlab-client";
|
||||
import GitLabMapper from "@bp/service/git/gitlab/gitlab-mapper";
|
||||
|
||||
const GITLAB_MERGED_PR_SIMPLE_CONFIG_FILE_CONTENT_PATHNAME = "./gitlab-pr-configs-parser-simple-pr-merged.json";
|
||||
const GITLAB_MERGED_PR_SIMPLE_CONFIG_FILE_CONTENT = {
|
||||
|
@ -32,6 +34,8 @@ const GITLAB_MERGED_PR_COMPLEX_CONFIG_FILE_CONTENT = {
|
|||
"inheritLabels": true,
|
||||
};
|
||||
|
||||
jest.spyOn(GitLabMapper.prototype, "mapPullRequest");
|
||||
jest.spyOn(GitLabClient.prototype, "getPullRequest");
|
||||
|
||||
jest.mock("axios", () => {
|
||||
return {
|
||||
|
@ -70,10 +74,6 @@ describe("gitlab merge request config parser", () => {
|
|||
configParser = new PullRequestConfigsParser();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
test("parse configs from merge request", async () => {
|
||||
const args: Args = {
|
||||
dryRun: false,
|
||||
|
@ -89,6 +89,11 @@ describe("gitlab merge request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledWith("superuser", "backporting-example", 1, true);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "Gitlab",
|
||||
|
@ -163,6 +168,11 @@ describe("gitlab merge request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledWith("superuser", "backporting-example", 1, true);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(true);
|
||||
expect(configs.auth).toEqual("whatever");
|
||||
expect(configs.targetBranch).toEqual("prod");
|
||||
|
@ -188,6 +198,11 @@ describe("gitlab merge request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledWith("superuser", "backporting-example", 2, true);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(true);
|
||||
expect(configs.auth).toEqual("whatever");
|
||||
expect(configs.targetBranch).toEqual("prod");
|
||||
|
@ -238,7 +253,7 @@ describe("gitlab merge request config parser", () => {
|
|||
inheritReviewers: true,
|
||||
};
|
||||
|
||||
expect(async () => await configParser.parseAndValidate(args)).rejects.toThrow("Provided pull request is closed and not merged!");
|
||||
await expect(() => configParser.parseAndValidate(args)).rejects.toThrow("Provided pull request is closed and not merged!");
|
||||
});
|
||||
|
||||
test("override backport pr data inheriting reviewers", async () => {
|
||||
|
@ -259,6 +274,11 @@ describe("gitlab merge request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledWith("superuser", "backporting-example", 1, true);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "Me",
|
||||
|
@ -334,6 +354,11 @@ describe("gitlab merge request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledWith("superuser", "backporting-example", 1, true);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "Me",
|
||||
|
@ -409,6 +434,11 @@ describe("gitlab merge request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledWith("superuser", "backporting-example", 1, true);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "Me",
|
||||
|
@ -486,6 +516,11 @@ describe("gitlab merge request config parser", () => {
|
|||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledWith("superuser", "backporting-example", 1, true);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "Me",
|
||||
|
@ -551,6 +586,11 @@ describe("gitlab merge request config parser", () => {
|
|||
const args: Args = argsParser.parse();
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledWith("superuser", "backporting-example", 1, true);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "Gitlab",
|
||||
|
@ -616,6 +656,11 @@ describe("gitlab merge request config parser", () => {
|
|||
const args: Args = argsParser.parse();
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledWith("superuser", "backporting-example", 1, true);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), []);
|
||||
|
||||
expect(configs.dryRun).toEqual(false);
|
||||
expect(configs.git).toEqual({
|
||||
user: "Me",
|
||||
|
@ -672,4 +717,61 @@ describe("gitlab merge request config parser", () => {
|
|||
bpBranchName: undefined,
|
||||
});
|
||||
});
|
||||
|
||||
test("still open pull request without squash", async () => {
|
||||
const args: Args = {
|
||||
dryRun: true,
|
||||
auth: "whatever",
|
||||
pullRequest: openPRUrl,
|
||||
targetBranch: "prod",
|
||||
gitUser: "Gitlab",
|
||||
gitEmail: "noreply@gitlab.com",
|
||||
reviewers: [],
|
||||
assignees: [],
|
||||
inheritReviewers: true,
|
||||
squash: false,
|
||||
};
|
||||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabClient.prototype.getPullRequest).toBeCalledWith("superuser", "backporting-example", 2, false);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabMapper.prototype.mapPullRequest).toBeCalledWith(expect.anything(), ["e4dd336a4a20f394df6665994df382fb1d193a11", "974519f65c9e0ed65277cd71026657a09fca05e7"]);
|
||||
|
||||
expect(configs.dryRun).toEqual(true);
|
||||
expect(configs.auth).toEqual("whatever");
|
||||
expect(configs.targetBranch).toEqual("prod");
|
||||
expect(configs.git).toEqual({
|
||||
user: "Gitlab",
|
||||
email: "noreply@gitlab.com"
|
||||
});
|
||||
expect(configs.originalPullRequest).toEqual({
|
||||
number: 2,
|
||||
author: "superuser",
|
||||
url: "https://my.gitlab.host.com/superuser/backporting-example/-/merge_requests/2",
|
||||
htmlUrl: "https://my.gitlab.host.com/superuser/backporting-example/-/merge_requests/2",
|
||||
state: "open",
|
||||
merged: false,
|
||||
mergedBy: undefined,
|
||||
title: "Update test.txt opened",
|
||||
body: "Still opened mr body",
|
||||
reviewers: ["superuser"],
|
||||
assignees: ["superuser"],
|
||||
labels: [],
|
||||
targetRepo: {
|
||||
owner: "superuser",
|
||||
project: "backporting-example",
|
||||
cloneUrl: "https://my.gitlab.host.com/superuser/backporting-example.git"
|
||||
},
|
||||
sourceRepo: {
|
||||
owner: "superuser",
|
||||
project: "backporting-example",
|
||||
cloneUrl: "https://my.gitlab.host.com/superuser/backporting-example.git"
|
||||
},
|
||||
bpBranchName: undefined,
|
||||
nCommits: 2,
|
||||
commits: ["e4dd336a4a20f394df6665994df382fb1d193a11", "974519f65c9e0ed65277cd71026657a09fca05e7"]
|
||||
});
|
||||
});
|
||||
});
|
|
@ -29,11 +29,7 @@ describe("github service", () => {
|
|||
GitClientFactory.reset();
|
||||
gitClient = GitClientFactory.getOrCreate(GitClientType.GITLAB, "whatever", "apiUrl") as GitLabClient;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
|
||||
test("get merged pull request", async () => {
|
||||
const res: GitPullRequest = await gitClient.getPullRequest("superuser", "backporting-example", 1);
|
||||
|
||||
|
|
|
@ -55,8 +55,6 @@ beforeEach(() => {
|
|||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
|
||||
// reset process.env variables
|
||||
resetProcessArgs();
|
||||
});
|
||||
|
@ -292,7 +290,7 @@ describe("cli runner", () => {
|
|||
"https://github.com/owner/reponame/pull/6666"
|
||||
]);
|
||||
|
||||
expect(async () => await runner.execute()).rejects.toThrow("Provided pull request is closed and not merged!");
|
||||
await expect(() => runner.execute()).rejects.toThrow("Provided pull request is closed and not merged!");
|
||||
});
|
||||
|
||||
test("open pull request", async () => {
|
||||
|
@ -636,4 +634,50 @@ describe("cli runner", () => {
|
|||
}
|
||||
);
|
||||
});
|
||||
|
||||
test("multiple commits pr", async () => {
|
||||
addProcessArgs([
|
||||
"-tb",
|
||||
"target",
|
||||
"-pr",
|
||||
"https://github.com/owner/reponame/pull/8632",
|
||||
"--no-squash",
|
||||
]);
|
||||
|
||||
await runner.execute();
|
||||
|
||||
const cwd = process.cwd() + "/bp";
|
||||
|
||||
expect(GitClientFactory.getOrCreate).toBeCalledTimes(1);
|
||||
expect(GitClientFactory.getOrCreate).toBeCalledWith(GitClientType.GITHUB, undefined, "https://api.github.com");
|
||||
|
||||
expect(GitCLIService.prototype.clone).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.clone).toBeCalledWith("https://github.com/owner/reponame.git", cwd, "target");
|
||||
|
||||
expect(GitCLIService.prototype.createLocalBranch).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.createLocalBranch).toBeCalledWith(cwd, "bp-target-0404fb922ab75c3a8aecad5c97d9af388df04695-11da4e38aa3e577ffde6d546f1c52e53b04d3151");
|
||||
|
||||
expect(GitCLIService.prototype.fetch).toBeCalledTimes(0);
|
||||
|
||||
expect(GitCLIService.prototype.cherryPick).toBeCalledTimes(2);
|
||||
expect(GitCLIService.prototype.cherryPick).toBeCalledWith(cwd, "0404fb922ab75c3a8aecad5c97d9af388df04695");
|
||||
expect(GitCLIService.prototype.cherryPick).toBeCalledWith(cwd, "11da4e38aa3e577ffde6d546f1c52e53b04d3151");
|
||||
|
||||
expect(GitCLIService.prototype.push).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.push).toBeCalledWith(cwd, "bp-target-0404fb922ab75c3a8aecad5c97d9af388df04695-11da4e38aa3e577ffde6d546f1c52e53b04d3151");
|
||||
|
||||
expect(GitHubClient.prototype.createPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubClient.prototype.createPullRequest).toBeCalledWith({
|
||||
owner: "owner",
|
||||
repo: "reponame",
|
||||
head: "bp-target-0404fb922ab75c3a8aecad5c97d9af388df04695-11da4e38aa3e577ffde6d546f1c52e53b04d3151",
|
||||
base: "target",
|
||||
title: "[target] PR Title",
|
||||
body: expect.stringContaining("**Backport:** https://github.com/owner/reponame/pull/8632"),
|
||||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
|
@ -68,8 +68,6 @@ beforeEach(() => {
|
|||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
|
||||
// reset process.env variables
|
||||
resetProcessArgs();
|
||||
});
|
||||
|
@ -198,7 +196,7 @@ describe("cli runner", () => {
|
|||
"https://my.gitlab.host.com/superuser/backporting-example/-/merge_requests/3"
|
||||
]);
|
||||
|
||||
expect(async () => await runner.execute()).rejects.toThrow("Provided pull request is closed and not merged!");
|
||||
await expect(() => runner.execute()).rejects.toThrow("Provided pull request is closed and not merged!");
|
||||
});
|
||||
|
||||
test("merged pull request", async () => {
|
||||
|
@ -501,4 +499,51 @@ describe("cli runner", () => {
|
|||
}
|
||||
);
|
||||
});
|
||||
|
||||
test("multiple commits without squash", async () => {
|
||||
addProcessArgs([
|
||||
"-tb",
|
||||
"target",
|
||||
"-pr",
|
||||
"https://my.gitlab.host.com/superuser/backporting-example/-/merge_requests/2",
|
||||
"--no-squash",
|
||||
]);
|
||||
|
||||
await runner.execute();
|
||||
|
||||
const cwd = process.cwd() + "/bp";
|
||||
|
||||
expect(GitClientFactory.getOrCreate).toBeCalledTimes(1);
|
||||
expect(GitClientFactory.getOrCreate).toBeCalledWith(GitClientType.GITLAB, undefined, "https://my.gitlab.host.com/api/v4");
|
||||
|
||||
expect(GitCLIService.prototype.clone).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.clone).toBeCalledWith("https://my.gitlab.host.com/superuser/backporting-example.git", cwd, "target");
|
||||
|
||||
expect(GitCLIService.prototype.createLocalBranch).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.createLocalBranch).toBeCalledWith(cwd, "bp-target-e4dd336a4a20f394df6665994df382fb1d193a11-974519f65c9e0ed65277cd71026657a09fca05e7");
|
||||
|
||||
expect(GitCLIService.prototype.fetch).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.fetch).toBeCalledWith(cwd, "merge-requests/2/head:pr/2");
|
||||
|
||||
expect(GitCLIService.prototype.cherryPick).toBeCalledTimes(2);
|
||||
expect(GitCLIService.prototype.cherryPick).toBeCalledWith(cwd, "e4dd336a4a20f394df6665994df382fb1d193a11");
|
||||
expect(GitCLIService.prototype.cherryPick).toBeCalledWith(cwd, "974519f65c9e0ed65277cd71026657a09fca05e7");
|
||||
|
||||
expect(GitCLIService.prototype.push).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.push).toBeCalledWith(cwd, "bp-target-e4dd336a4a20f394df6665994df382fb1d193a11-974519f65c9e0ed65277cd71026657a09fca05e7");
|
||||
|
||||
expect(GitLabClient.prototype.createPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabClient.prototype.createPullRequest).toBeCalledWith({
|
||||
owner: "superuser",
|
||||
repo: "backporting-example",
|
||||
head: "bp-target-e4dd336a4a20f394df6665994df382fb1d193a11-974519f65c9e0ed65277cd71026657a09fca05e7",
|
||||
base: "target",
|
||||
title: "[target] Update test.txt opened",
|
||||
body: expect.stringContaining("**Backport:** https://my.gitlab.host.com/superuser/backporting-example/-/merge_requests/2"),
|
||||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
|
@ -55,10 +55,6 @@ beforeEach(() => {
|
|||
runner = new Runner(parser);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
describe("gha runner", () => {
|
||||
test("with dry run", async () => {
|
||||
spyGetInput({
|
||||
|
@ -139,7 +135,7 @@ describe("gha runner", () => {
|
|||
"pull-request": "https://github.com/owner/reponame/pull/6666"
|
||||
});
|
||||
|
||||
expect(async () => await runner.execute()).rejects.toThrow("Provided pull request is closed and not merged!");
|
||||
await expect(() => runner.execute()).rejects.toThrow("Provided pull request is closed and not merged!");
|
||||
});
|
||||
|
||||
test("open pull request", async () => {
|
||||
|
@ -460,4 +456,47 @@ describe("gha runner", () => {
|
|||
);
|
||||
});
|
||||
|
||||
test("multiple commits pr", async () => {
|
||||
spyGetInput({
|
||||
"target-branch": "target",
|
||||
"pull-request": "https://api.github.com/repos/owner/reponame/pulls/8632",
|
||||
"no-squash": "true",
|
||||
});
|
||||
|
||||
await runner.execute();
|
||||
|
||||
const cwd = process.cwd() + "/bp";
|
||||
|
||||
expect(GitClientFactory.getOrCreate).toBeCalledTimes(1);
|
||||
expect(GitClientFactory.getOrCreate).toBeCalledWith(GitClientType.GITHUB, undefined, "https://api.github.com");
|
||||
|
||||
expect(GitCLIService.prototype.clone).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.clone).toBeCalledWith("https://github.com/owner/reponame.git", cwd, "target");
|
||||
|
||||
expect(GitCLIService.prototype.createLocalBranch).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.createLocalBranch).toBeCalledWith(cwd, "bp-target-0404fb922ab75c3a8aecad5c97d9af388df04695-11da4e38aa3e577ffde6d546f1c52e53b04d3151");
|
||||
|
||||
expect(GitCLIService.prototype.fetch).toBeCalledTimes(0);
|
||||
|
||||
expect(GitCLIService.prototype.cherryPick).toBeCalledTimes(2);
|
||||
expect(GitCLIService.prototype.cherryPick).toBeCalledWith(cwd, "0404fb922ab75c3a8aecad5c97d9af388df04695");
|
||||
expect(GitCLIService.prototype.cherryPick).toBeCalledWith(cwd, "11da4e38aa3e577ffde6d546f1c52e53b04d3151");
|
||||
|
||||
expect(GitCLIService.prototype.push).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.push).toBeCalledWith(cwd, "bp-target-0404fb922ab75c3a8aecad5c97d9af388df04695-11da4e38aa3e577ffde6d546f1c52e53b04d3151");
|
||||
|
||||
expect(GitHubClient.prototype.createPullRequest).toBeCalledTimes(1);
|
||||
expect(GitHubClient.prototype.createPullRequest).toBeCalledWith({
|
||||
owner: "owner",
|
||||
repo: "reponame",
|
||||
head: "bp-target-0404fb922ab75c3a8aecad5c97d9af388df04695-11da4e38aa3e577ffde6d546f1c52e53b04d3151",
|
||||
base: "target",
|
||||
title: "[target] PR Title",
|
||||
body: expect.stringContaining("**Backport:** https://github.com/owner/reponame/pull/8632"),
|
||||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
|
@ -66,10 +66,6 @@ beforeEach(() => {
|
|||
runner = new Runner(parser);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
describe("gha runner", () => {
|
||||
test("with dry run", async () => {
|
||||
spyGetInput({
|
||||
|
@ -150,7 +146,7 @@ describe("gha runner", () => {
|
|||
"pull-request": "https://my.gitlab.host.com/superuser/backporting-example/-/merge_requests/3"
|
||||
});
|
||||
|
||||
expect(async () => await runner.execute()).rejects.toThrow("Provided pull request is closed and not merged!");
|
||||
await expect(() => runner.execute()).rejects.toThrow("Provided pull request is closed and not merged!");
|
||||
});
|
||||
|
||||
test("merged pull request", async () => {
|
||||
|
@ -423,4 +419,49 @@ describe("gha runner", () => {
|
|||
}
|
||||
);
|
||||
});
|
||||
|
||||
test("multiple commits without squash", async () => {
|
||||
spyGetInput({
|
||||
"target-branch": "target",
|
||||
"pull-request": "https://my.gitlab.host.com/superuser/backporting-example/-/merge_requests/2",
|
||||
"no-squash": "true",
|
||||
});
|
||||
|
||||
await runner.execute();
|
||||
|
||||
const cwd = process.cwd() + "/bp";
|
||||
|
||||
expect(GitClientFactory.getOrCreate).toBeCalledTimes(1);
|
||||
expect(GitClientFactory.getOrCreate).toBeCalledWith(GitClientType.GITLAB, undefined, "https://my.gitlab.host.com/api/v4");
|
||||
|
||||
expect(GitCLIService.prototype.clone).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.clone).toBeCalledWith("https://my.gitlab.host.com/superuser/backporting-example.git", cwd, "target");
|
||||
|
||||
expect(GitCLIService.prototype.createLocalBranch).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.createLocalBranch).toBeCalledWith(cwd, "bp-target-e4dd336a4a20f394df6665994df382fb1d193a11-974519f65c9e0ed65277cd71026657a09fca05e7");
|
||||
|
||||
expect(GitCLIService.prototype.fetch).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.fetch).toBeCalledWith(cwd, "merge-requests/2/head:pr/2");
|
||||
|
||||
expect(GitCLIService.prototype.cherryPick).toBeCalledTimes(2);
|
||||
expect(GitCLIService.prototype.cherryPick).toBeCalledWith(cwd, "e4dd336a4a20f394df6665994df382fb1d193a11");
|
||||
expect(GitCLIService.prototype.cherryPick).toBeCalledWith(cwd, "974519f65c9e0ed65277cd71026657a09fca05e7");
|
||||
|
||||
expect(GitCLIService.prototype.push).toBeCalledTimes(1);
|
||||
expect(GitCLIService.prototype.push).toBeCalledWith(cwd, "bp-target-e4dd336a4a20f394df6665994df382fb1d193a11-974519f65c9e0ed65277cd71026657a09fca05e7");
|
||||
|
||||
expect(GitLabClient.prototype.createPullRequest).toBeCalledTimes(1);
|
||||
expect(GitLabClient.prototype.createPullRequest).toBeCalledWith({
|
||||
owner: "superuser",
|
||||
repo: "backporting-example",
|
||||
head: "bp-target-e4dd336a4a20f394df6665994df382fb1d193a11-974519f65c9e0ed65277cd71026657a09fca05e7",
|
||||
base: "target",
|
||||
title: "[target] Update test.txt opened",
|
||||
body: expect.stringContaining("**Backport:** https://my.gitlab.host.com/superuser/backporting-example/-/merge_requests/2"),
|
||||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue