mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-15 17:16:25 +00:00
274 lines
7.3 KiB
Text
274 lines
7.3 KiB
Text
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`modules/platform/gitlab/index createPr(branchName, title, body) raises with squash enabled when repository squash option is always 1`] = `
|
|
Object {
|
|
"displayNumber": "Merge Request #12345",
|
|
"id": 1,
|
|
"iid": 12345,
|
|
"number": 12345,
|
|
"sourceBranch": "some-branch",
|
|
"title": "some title",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index createPr(branchName, title, body) raises with squash enabled when repository squash option is default_on 1`] = `
|
|
Object {
|
|
"displayNumber": "Merge Request #12345",
|
|
"id": 1,
|
|
"iid": 12345,
|
|
"number": 12345,
|
|
"sourceBranch": "some-branch",
|
|
"title": "some title",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index createPr(branchName, title, body) returns the PR 1`] = `
|
|
Object {
|
|
"displayNumber": "Merge Request #12345",
|
|
"id": 1,
|
|
"iid": 12345,
|
|
"number": 12345,
|
|
"sourceBranch": "some-branch",
|
|
"title": "some title",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index createPr(branchName, title, body) supports draftPR on < 13.2 1`] = `
|
|
Object {
|
|
"displayNumber": "Merge Request #12345",
|
|
"id": 1,
|
|
"iid": 12345,
|
|
"isDraft": true,
|
|
"number": 12345,
|
|
"sourceBranch": "some-branch",
|
|
"title": "some title",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index createPr(branchName, title, body) supports draftPR on >= 13.2 1`] = `
|
|
Object {
|
|
"displayNumber": "Merge Request #12345",
|
|
"id": 1,
|
|
"iid": 12345,
|
|
"isDraft": true,
|
|
"number": 12345,
|
|
"sourceBranch": "some-branch",
|
|
"title": "some title",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index createPr(branchName, title, body) uses default branch 1`] = `
|
|
Object {
|
|
"displayNumber": "Merge Request #12345",
|
|
"id": 1,
|
|
"iid": 12345,
|
|
"number": 12345,
|
|
"sourceBranch": "some-branch",
|
|
"title": "some title",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index getBranchPr(branchName) should return the PR object 1`] = `
|
|
Object {
|
|
"bodyStruct": Object {
|
|
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
},
|
|
"displayNumber": "Merge Request #91",
|
|
"hasAssignees": false,
|
|
"hasReviewers": false,
|
|
"labels": undefined,
|
|
"number": 91,
|
|
"sha": undefined,
|
|
"sourceBranch": "some-branch",
|
|
"state": "open",
|
|
"targetBranch": "master",
|
|
"title": "some change",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index getBranchPr(branchName) should strip deprecated draft prefix from title 1`] = `
|
|
Object {
|
|
"bodyStruct": Object {
|
|
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
},
|
|
"displayNumber": "Merge Request #91",
|
|
"hasAssignees": false,
|
|
"hasReviewers": false,
|
|
"isDraft": true,
|
|
"labels": undefined,
|
|
"number": 91,
|
|
"sha": undefined,
|
|
"sourceBranch": "some-branch",
|
|
"state": "open",
|
|
"targetBranch": "master",
|
|
"title": "some change",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index getBranchPr(branchName) should strip draft prefix from title 1`] = `
|
|
Object {
|
|
"bodyStruct": Object {
|
|
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
},
|
|
"displayNumber": "Merge Request #91",
|
|
"hasAssignees": false,
|
|
"hasReviewers": false,
|
|
"isDraft": true,
|
|
"labels": undefined,
|
|
"number": 91,
|
|
"sha": undefined,
|
|
"sourceBranch": "some-branch",
|
|
"state": "open",
|
|
"targetBranch": "master",
|
|
"title": "some change",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index getPr(prNo) removes deprecated draft prefix from returned title 1`] = `
|
|
Object {
|
|
"bodyStruct": Object {
|
|
"hash": "23f41dbec0785a6c77457dd6ebf99ae5970c5fffc9f7a8ad7f66c1b8eeba5b90",
|
|
},
|
|
"displayNumber": "Merge Request #12345",
|
|
"hasAssignees": false,
|
|
"hasReviewers": false,
|
|
"isDraft": true,
|
|
"labels": undefined,
|
|
"number": 12345,
|
|
"sha": undefined,
|
|
"sourceBranch": "some-branch",
|
|
"state": "merged",
|
|
"targetBranch": "master",
|
|
"title": "do something",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index getPr(prNo) removes draft prefix from returned title 1`] = `
|
|
Object {
|
|
"bodyStruct": Object {
|
|
"hash": "23f41dbec0785a6c77457dd6ebf99ae5970c5fffc9f7a8ad7f66c1b8eeba5b90",
|
|
},
|
|
"displayNumber": "Merge Request #12345",
|
|
"hasAssignees": false,
|
|
"hasReviewers": false,
|
|
"isDraft": true,
|
|
"labels": undefined,
|
|
"number": 12345,
|
|
"sha": undefined,
|
|
"sourceBranch": "some-branch",
|
|
"state": "merged",
|
|
"targetBranch": "master",
|
|
"title": "do something",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index getPr(prNo) returns the PR 1`] = `
|
|
Object {
|
|
"bodyStruct": Object {
|
|
"hash": "23f41dbec0785a6c77457dd6ebf99ae5970c5fffc9f7a8ad7f66c1b8eeba5b90",
|
|
},
|
|
"displayNumber": "Merge Request #12345",
|
|
"hasAssignees": false,
|
|
"hasReviewers": false,
|
|
"labels": undefined,
|
|
"number": 12345,
|
|
"sha": undefined,
|
|
"sourceBranch": "some-branch",
|
|
"state": "merged",
|
|
"targetBranch": "master",
|
|
"title": "do something",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index getPr(prNo) returns the PR with nonexisting branch 1`] = `
|
|
Object {
|
|
"bodyStruct": Object {
|
|
"hash": "23f41dbec0785a6c77457dd6ebf99ae5970c5fffc9f7a8ad7f66c1b8eeba5b90",
|
|
},
|
|
"displayNumber": "Merge Request #12345",
|
|
"hasAssignees": true,
|
|
"hasReviewers": false,
|
|
"labels": undefined,
|
|
"number": 12345,
|
|
"sha": undefined,
|
|
"sourceBranch": "some-branch",
|
|
"state": "open",
|
|
"targetBranch": "master",
|
|
"title": "do something",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index getPr(prNo) returns the mergeable PR 1`] = `
|
|
Object {
|
|
"bodyStruct": Object {
|
|
"hash": "23f41dbec0785a6c77457dd6ebf99ae5970c5fffc9f7a8ad7f66c1b8eeba5b90",
|
|
},
|
|
"displayNumber": "Merge Request #12345",
|
|
"hasAssignees": true,
|
|
"hasReviewers": false,
|
|
"labels": undefined,
|
|
"number": 12345,
|
|
"sha": undefined,
|
|
"sourceBranch": "some-branch",
|
|
"state": "open",
|
|
"targetBranch": "master",
|
|
"title": "do something",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index initPlatform() should accept custom endpoint 1`] = `
|
|
Object {
|
|
"endpoint": "https://gitlab.renovatebot.com/",
|
|
"gitAuthor": "Renovate Bot <a@b.com>",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index initPlatform() should default to gitlab.com 1`] = `
|
|
Object {
|
|
"endpoint": "https://gitlab.com/api/v4/",
|
|
"gitAuthor": "Renovate Bot <a@b.com>",
|
|
}
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index initRepo should fall back respecting when GITLAB_IGNORE_REPO_URL is set 1`] = `
|
|
Array [
|
|
Array [
|
|
Object {
|
|
"cloneSubmodules": undefined,
|
|
"defaultBranch": "master",
|
|
"ignorePrAuthor": undefined,
|
|
"mergeMethod": "merge",
|
|
"repository": "some%2Frepo%2Fproject",
|
|
"url": "http://oauth2:123test@mycompany.com/gitlab/some/repo/project.git",
|
|
},
|
|
],
|
|
]
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index initRepo should use ssh_url_to_repo if gitUrl is set to ssh 1`] = `
|
|
Array [
|
|
Array [
|
|
Object {
|
|
"cloneSubmodules": undefined,
|
|
"defaultBranch": "master",
|
|
"ignorePrAuthor": undefined,
|
|
"mergeMethod": "merge",
|
|
"repository": "some%2Frepo%2Fproject",
|
|
"url": "ssh://git@gitlab.com/some%2Frepo%2Fproject.git",
|
|
},
|
|
],
|
|
]
|
|
`;
|
|
|
|
exports[`modules/platform/gitlab/index massageMarkdown(input) returns updated pr body 1`] = `
|
|
"https://github.com/foo/bar/issues/5 plus also [a link](https://github.com/foo/bar/issues/5
|
|
|
|
Merge Requests are the best, here are some MRs.
|
|
|
|
## Open
|
|
|
|
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
|
|
|
|
- [ ] <!-- rebase-branch=renovate/major-got-packages -->[build(deps): update got packages (major)](!2433) (\`gh-got\`, \`gl-got\`, \`got\`)
|
|
"
|
|
`;
|