mirror of
https://code.forgejo.org/actions/git-backporting.git
synced 2025-06-02 02:44:29 -04:00
refactor: move backport data generation to configs parser
This commit is contained in:
parent
e13d1fbf00
commit
10a46551ee
15 changed files with 238 additions and 310 deletions
|
@ -129,25 +129,16 @@ describe("github pull request config parser", () => {
|
|||
commits: ["28f63db774185f4ec4b57cd9aaeb12dbfb4c9ecc"]
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "GitHub",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
title: "[prod] PR Title",
|
||||
owner: "owner",
|
||||
repo: "reponame",
|
||||
head: "bp-prod-28f63db",
|
||||
base: "prod",
|
||||
title: "[prod] PR Title",
|
||||
body: "**Backport:** https://github.com/owner/reponame/pull/2368\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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -264,6 +255,7 @@ describe("github pull request config parser", () => {
|
|||
reviewers: [],
|
||||
assignees: [],
|
||||
inheritReviewers: true,
|
||||
bpBranchName: "custom-branch"
|
||||
};
|
||||
|
||||
const configs: Configs = await configParser.parseAndValidate(args);
|
||||
|
@ -309,25 +301,16 @@ describe("github pull request config parser", () => {
|
|||
commits: ["28f63db774185f4ec4b57cd9aaeb12dbfb4c9ecc"],
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "Me",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "owner",
|
||||
repo: "reponame",
|
||||
head: "custom-branch",
|
||||
base: "prod",
|
||||
title: "New Title",
|
||||
body: "New Body Prefix -New Body",
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -390,25 +373,16 @@ describe("github pull request config parser", () => {
|
|||
commits: ["28f63db774185f4ec4b57cd9aaeb12dbfb4c9ecc"],
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "Me",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "owner",
|
||||
repo: "reponame",
|
||||
head: "bp-prod-28f63db",
|
||||
base: "prod",
|
||||
title: "New Title",
|
||||
body: "New Body Prefix -New Body",
|
||||
reviewers: ["user1", "user2"],
|
||||
assignees: ["user3", "user4"],
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -471,25 +445,16 @@ describe("github pull request config parser", () => {
|
|||
commits: ["28f63db774185f4ec4b57cd9aaeb12dbfb4c9ecc"],
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "Me",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "owner",
|
||||
repo: "reponame",
|
||||
head: "bp-prod-28f63db",
|
||||
base: "prod",
|
||||
title: "New Title",
|
||||
body: "New Body Prefix -New Body",
|
||||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -554,25 +519,16 @@ describe("github pull request config parser", () => {
|
|||
commits: ["28f63db774185f4ec4b57cd9aaeb12dbfb4c9ecc"],
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "Me",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "owner",
|
||||
repo: "reponame",
|
||||
head: "bp-prod-28f63db",
|
||||
base: "prod",
|
||||
title: "New Title",
|
||||
body: "New Body Prefix -New Body",
|
||||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: ["custom-label", "original-label"],
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -625,25 +581,16 @@ describe("github pull request config parser", () => {
|
|||
commits: ["28f63db774185f4ec4b57cd9aaeb12dbfb4c9ecc"]
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "GitHub",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "owner",
|
||||
repo: "reponame",
|
||||
head: "bp-prod-28f63db",
|
||||
base: "prod",
|
||||
title: "[prod] PR Title",
|
||||
body: "**Backport:** https://github.com/owner/reponame/pull/2368\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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -697,25 +644,16 @@ describe("github pull request config parser", () => {
|
|||
commits: ["28f63db774185f4ec4b57cd9aaeb12dbfb4c9ecc"],
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "Me",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "owner",
|
||||
repo: "reponame",
|
||||
head: "bp-prod-28f63db",
|
||||
base: "prod",
|
||||
title: "New Title",
|
||||
body: "New Body Prefix -New Body",
|
||||
reviewers: ["user1", "user2"],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: ["cherry-pick :cherries:", "original-label"],
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -775,25 +713,16 @@ describe("github pull request config parser", () => {
|
|||
commits: ["0404fb922ab75c3a8aecad5c97d9af388df04695", "11da4e38aa3e577ffde6d546f1c52e53b04d3151"]
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "GitHub",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "owner",
|
||||
repo: "reponame",
|
||||
head: "bp-prod-0404fb9-11da4e3",
|
||||
base: "prod",
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
});
|
|
@ -129,25 +129,16 @@ describe("gitlab merge request config parser", () => {
|
|||
commits: ["ebb1eca696c42fd067658bd9b5267709f78ef38e"]
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "Gitlab",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "superuser",
|
||||
repo: "backporting-example",
|
||||
head: "bp-prod-ebb1eca",
|
||||
base: "prod",
|
||||
title: "[prod] Update test.txt",
|
||||
body: "**Backport:** https://my.gitlab.host.com/superuser/backporting-example/-/merge_requests/1\r\n\r\nThis is the body",
|
||||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -314,25 +305,16 @@ describe("gitlab merge request config parser", () => {
|
|||
commits: ["ebb1eca696c42fd067658bd9b5267709f78ef38e"]
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "Me",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "superuser",
|
||||
repo: "backporting-example",
|
||||
head: "bp-prod-ebb1eca",
|
||||
base: "prod",
|
||||
title: "New Title",
|
||||
body: "New Body Prefix -New Body",
|
||||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -394,25 +376,16 @@ describe("gitlab merge request config parser", () => {
|
|||
commits: ["ebb1eca696c42fd067658bd9b5267709f78ef38e"]
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "Me",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "superuser",
|
||||
repo: "backporting-example",
|
||||
head: "bp-prod-ebb1eca",
|
||||
base: "prod",
|
||||
title: "New Title",
|
||||
body: "New Body Prefix -New Body",
|
||||
reviewers: ["user1", "user2"],
|
||||
assignees: ["user3", "user4"],
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -474,25 +447,16 @@ describe("gitlab merge request config parser", () => {
|
|||
commits: ["ebb1eca696c42fd067658bd9b5267709f78ef38e"]
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "Me",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "superuser",
|
||||
repo: "backporting-example",
|
||||
head: "bp-prod-ebb1eca",
|
||||
base: "prod",
|
||||
title: "New Title",
|
||||
body: "New Body Prefix -New Body",
|
||||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -556,25 +520,16 @@ describe("gitlab merge request config parser", () => {
|
|||
commits: ["ebb1eca696c42fd067658bd9b5267709f78ef38e"]
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "Me",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "superuser",
|
||||
repo: "backporting-example",
|
||||
head: "bp-prod-ebb1eca",
|
||||
base: "prod",
|
||||
title: "New Title",
|
||||
body: "New Body Prefix -New Body",
|
||||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: ["custom-label", "gitlab-original-label"],
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -626,25 +581,16 @@ describe("gitlab merge request config parser", () => {
|
|||
commits: ["ebb1eca696c42fd067658bd9b5267709f78ef38e"]
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "Gitlab",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "superuser",
|
||||
repo: "backporting-example",
|
||||
head: "bp-prod-ebb1eca",
|
||||
base: "prod",
|
||||
title: "[prod] Update test.txt",
|
||||
body: "**Backport:** https://my.gitlab.host.com/superuser/backporting-example/-/merge_requests/1\r\n\r\nThis is the body",
|
||||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -696,25 +642,16 @@ describe("gitlab merge request config parser", () => {
|
|||
commits: ["ebb1eca696c42fd067658bd9b5267709f78ef38e"]
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
author: "Me",
|
||||
url: undefined,
|
||||
htmlUrl: undefined,
|
||||
owner: "superuser",
|
||||
repo: "backporting-example",
|
||||
head: "bp-prod-ebb1eca",
|
||||
base: "prod",
|
||||
title: "New Title",
|
||||
body: "New Body Prefix -New Body",
|
||||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: ["cherry-pick :cherries:", "gitlab-original-label"],
|
||||
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,
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -773,5 +710,17 @@ describe("gitlab merge request config parser", () => {
|
|||
nCommits: 2,
|
||||
commits: ["e4dd336a4a20f394df6665994df382fb1d193a11", "974519f65c9e0ed65277cd71026657a09fca05e7"]
|
||||
});
|
||||
expect(configs.backportPullRequest).toEqual({
|
||||
owner: "superuser",
|
||||
repo: "backporting-example",
|
||||
head: "bp-prod-e4dd336-974519f",
|
||||
base: "prod",
|
||||
title: "[prod] Update test.txt opened",
|
||||
body: "**Backport:** https://my.gitlab.host.com/superuser/backporting-example/-/merge_requests/2\r\n\r\nStill opened mr body",
|
||||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
});
|
||||
});
|
||||
});
|
|
@ -89,6 +89,7 @@ describe("github service", () => {
|
|||
reviewers: [],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
};
|
||||
|
||||
const url: string = await gitClient.createPullRequest(backport);
|
||||
|
@ -119,6 +120,7 @@ describe("github service", () => {
|
|||
reviewers: ["superuser", "invalid"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
};
|
||||
|
||||
const url: string = await gitClient.createPullRequest(backport);
|
||||
|
@ -154,6 +156,7 @@ describe("github service", () => {
|
|||
reviewers: [],
|
||||
assignees: ["superuser", "invalid"],
|
||||
labels: [],
|
||||
comments: [],
|
||||
};
|
||||
|
||||
const url: string = await gitClient.createPullRequest(backport);
|
||||
|
@ -189,6 +192,7 @@ describe("github service", () => {
|
|||
reviewers: ["superuser", "invalid"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
};
|
||||
|
||||
const url: string = await gitClient.createPullRequest(backport);
|
||||
|
@ -224,6 +228,7 @@ describe("github service", () => {
|
|||
reviewers: [],
|
||||
assignees: ["superuser", "invalid"],
|
||||
labels: [],
|
||||
comments: [],
|
||||
};
|
||||
|
||||
const url: string = await gitClient.createPullRequest(backport);
|
||||
|
@ -259,6 +264,7 @@ describe("github service", () => {
|
|||
reviewers: [],
|
||||
assignees: [],
|
||||
labels: ["label1", "label2"],
|
||||
comments: [],
|
||||
};
|
||||
|
||||
const url: string = await gitClient.createPullRequest(backport);
|
||||
|
@ -280,4 +286,39 @@ describe("github service", () => {
|
|||
labels: "label1,label2",
|
||||
});
|
||||
});
|
||||
|
||||
test("create backport pull request with post comments", async () => {
|
||||
const backport: BackportPullRequest = {
|
||||
title: "Backport Title",
|
||||
body: "Backport Body",
|
||||
owner: "superuser",
|
||||
repo: "backporting-example",
|
||||
base: "old/branch",
|
||||
head: "bp-branch-2",
|
||||
reviewers: [],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: ["this is first comment", "this is second comment"],
|
||||
};
|
||||
|
||||
const url: string = await gitClient.createPullRequest(backport);
|
||||
expect(url).toStrictEqual("https://my.gitlab.host.com/superuser/backporting-example/-/merge_requests/" + SECOND_NEW_GITLAB_MR_ID);
|
||||
|
||||
// check axios invocation
|
||||
expect(axiosInstanceSpy.post).toBeCalledTimes(1);
|
||||
expect(axiosInstanceSpy.post).toBeCalledWith("/projects/superuser%2Fbackporting-example/merge_requests", expect.objectContaining({
|
||||
source_branch: "bp-branch-2",
|
||||
target_branch: "old/branch",
|
||||
title: "Backport Title",
|
||||
description: "Backport Body",
|
||||
reviewer_ids: [],
|
||||
assignee_ids: [],
|
||||
}));
|
||||
expect(axiosInstanceSpy.get).toBeCalledTimes(0);
|
||||
// FIXME
|
||||
// expect(axiosInstanceSpy.put).toBeCalledTimes(1); // just comments
|
||||
// expect(axiosInstanceSpy.put).toBeCalledWith("/projects/superuser%2Fbackporting-example/merge_requests/" + SECOND_NEW_GITLAB_MR_ID, {
|
||||
// labels: "label1,label2",
|
||||
// });
|
||||
});
|
||||
});
|
|
@ -233,6 +233,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -277,6 +278,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -333,6 +335,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["gh-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -390,6 +393,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["user1", "user2"],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -446,6 +450,7 @@ describe("cli runner", () => {
|
|||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -494,11 +499,12 @@ describe("cli runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: ["cherry-pick :cherries:", "original-label"],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
test("set custom lables without inheritance", async () => {
|
||||
test("set custom labels without inheritance", async () => {
|
||||
addProcessArgs([
|
||||
"-tb",
|
||||
"target",
|
||||
|
@ -541,6 +547,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: ["first-label", "second-label"],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -584,6 +591,7 @@ describe("cli runner", () => {
|
|||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: ["cli github cherry pick :cherries:", "original-label"],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -630,6 +638,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -676,6 +685,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -728,6 +738,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -778,6 +789,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
@ -181,6 +181,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -238,6 +239,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -296,6 +298,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["user1", "user2"],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -352,6 +355,7 @@ describe("cli runner", () => {
|
|||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -401,6 +405,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: ["cherry-pick :cherries:", "another-label", "gitlab-original-label"],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -449,6 +454,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: ["cherry-pick :cherries:", "another-label"],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -493,6 +499,7 @@ describe("cli runner", () => {
|
|||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: ["cli gitlab cherry pick :cherries:", "gitlab-original-label"],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -540,6 +547,7 @@ describe("cli runner", () => {
|
|||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
@ -125,6 +125,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -177,6 +178,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["gh-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -226,6 +228,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["user1", "user2"],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -276,6 +279,7 @@ describe("gha runner", () => {
|
|||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -321,6 +325,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: ["cherry-pick :cherries:", "another-label", "original-label"],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -366,6 +371,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: ["cherry-pick :cherries:", "another-label"],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -408,6 +414,7 @@ describe("gha runner", () => {
|
|||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: ["gha github cherry pick :cherries:", "original-label"],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -452,6 +459,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -496,6 +504,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -541,6 +550,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["gh-user", "that-s-a-user"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
@ -136,6 +136,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -187,6 +188,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -236,6 +238,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["user1", "user2"],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -286,6 +289,7 @@ describe("gha runner", () => {
|
|||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -330,6 +334,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: ["cherry-pick :cherries:", "another-label", "gitlab-original-label"],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -373,6 +378,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: ["cherry-pick :cherries:", "another-label"],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -416,6 +422,7 @@ describe("gha runner", () => {
|
|||
reviewers: [],
|
||||
assignees: ["user3", "user4"],
|
||||
labels: ["gha gitlab cherry pick :cherries:", "gitlab-original-label"],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -461,6 +468,7 @@ describe("gha runner", () => {
|
|||
reviewers: ["superuser"],
|
||||
assignees: [],
|
||||
labels: [],
|
||||
comments: [],
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue