mirror of
https://code.forgejo.org/actions/git-backporting.git
synced 2025-05-13 09:09:13 -04:00
feat(issue-70): additional pr comments
This commit is contained in:
parent
10a46551ee
commit
bed7e29ddc
20 changed files with 424 additions and 16 deletions
|
@ -305,7 +305,7 @@ describe("github service", () => {
|
|||
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).toBeCalledTimes(3); // also comments
|
||||
expect(axiosInstanceSpy.post).toBeCalledWith("/projects/superuser%2Fbackporting-example/merge_requests", expect.objectContaining({
|
||||
source_branch: "bp-branch-2",
|
||||
target_branch: "old/branch",
|
||||
|
@ -315,10 +315,12 @@ describe("github service", () => {
|
|||
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",
|
||||
// });
|
||||
|
||||
expect(axiosInstanceSpy.post).toBeCalledWith("/projects/superuser%2Fbackporting-example/merge_requests/" + SECOND_NEW_GITLAB_MR_ID + "/notes", {
|
||||
body: "this is first comment",
|
||||
});
|
||||
expect(axiosInstanceSpy.post).toBeCalledWith("/projects/superuser%2Fbackporting-example/merge_requests/" + SECOND_NEW_GITLAB_MR_ID + "/notes", {
|
||||
body: "this is second comment",
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue