/
index.spec.ts.snap
191 lines (177 loc) · 4.99 KB
/
index.spec.ts.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`platform/gitea/index createPr should use base branch by default 1`] = `
Object {
"body": "pr-body",
"cannotMergeReason": undefined,
"createdAt": "2014-04-01T05:14:20Z",
"displayNumber": "Pull Request #42",
"hasAssignees": false,
"number": 42,
"sha": "0d9c7726c3d628b7e28af234595cfd20febdbf8e",
"sourceBranch": "pr-branch",
"sourceRepo": "some/repo",
"state": "open",
"targetBranch": "devel",
"title": "pr-title",
}
`;
exports[`platform/gitea/index createPr should use default branch if requested 1`] = `
Object {
"body": "pr-body",
"cannotMergeReason": undefined,
"createdAt": "2014-04-01T05:14:20Z",
"displayNumber": "Pull Request #42",
"hasAssignees": false,
"number": 42,
"sha": "0d9c7726c3d628b7e28af234595cfd20febdbf8e",
"sourceBranch": "pr-branch",
"sourceRepo": "some/repo",
"state": "open",
"targetBranch": "master",
"title": "pr-title",
}
`;
exports[`platform/gitea/index getPr should fallback to direct fetching if cache fails 1`] = `
Object {
"body": "some random pull request",
"cannotMergeReason": "pr.mergeable=\\"false\\"",
"createdAt": "2015-03-22T20:36:16Z",
"displayNumber": "Pull Request #1",
"hasAssignees": false,
"number": 1,
"sha": "some-head-sha",
"sourceBranch": "some-head-branch",
"sourceRepo": "some/repo",
"state": "open",
"targetBranch": "some-base-branch",
"title": "Some PR",
}
`;
exports[`platform/gitea/index getPr should return enriched pull request which exists if open 1`] = `
Object {
"body": "some random pull request",
"cannotMergeReason": undefined,
"createdAt": "2015-03-22T20:36:16Z",
"displayNumber": "Pull Request #1",
"hasAssignees": false,
"number": 1,
"sha": "some-head-sha",
"sourceBranch": "some-head-branch",
"sourceRepo": "some/repo",
"state": "open",
"targetBranch": "some-base-branch",
"title": "Some PR",
}
`;
exports[`platform/gitea/index getPrList should filter list by creator 1`] = `
Object {
"endpoint": "https://gitea.com/api/v1/",
"gitAuthor": "Renovate Bot <renovate@example.com>",
}
`;
exports[`platform/gitea/index getPrList should filter list by creator 2`] = `
Array [
Object {
"body": "some random pull request",
"cannotMergeReason": undefined,
"createdAt": "2015-03-22T20:36:16Z",
"displayNumber": "Pull Request #1",
"hasAssignees": false,
"number": 1,
"sha": "some-head-sha",
"sourceBranch": "some-head-branch",
"sourceRepo": "some/repo",
"state": "open",
"targetBranch": "some-base-branch",
"title": "Some PR",
},
Object {
"body": "other random pull request",
"cannotMergeReason": undefined,
"createdAt": "2011-08-18T22:30:38Z",
"displayNumber": "Pull Request #2",
"hasAssignees": false,
"number": 2,
"sha": "other-head-sha",
"sourceBranch": "other-head-branch",
"sourceRepo": "some/repo",
"state": "closed",
"targetBranch": "other-base-branch",
"title": "Other PR",
},
]
`;
exports[`platform/gitea/index getPrList should return list of pull requests 1`] = `
Array [
Object {
"body": "some random pull request",
"cannotMergeReason": undefined,
"createdAt": "2015-03-22T20:36:16Z",
"displayNumber": "Pull Request #1",
"hasAssignees": false,
"number": 1,
"sha": "some-head-sha",
"sourceBranch": "some-head-branch",
"sourceRepo": "some/repo",
"state": "open",
"targetBranch": "some-base-branch",
"title": "Some PR",
},
Object {
"body": "other random pull request",
"cannotMergeReason": undefined,
"createdAt": "2011-08-18T22:30:38Z",
"displayNumber": "Pull Request #2",
"hasAssignees": false,
"number": 2,
"sha": "other-head-sha",
"sourceBranch": "other-head-branch",
"sourceRepo": "some/repo",
"state": "closed",
"targetBranch": "other-base-branch",
"title": "Other PR",
},
]
`;
exports[`platform/gitea/index getRepos should return an array of repos 1`] = `
Array [
"a/b",
"c/d",
]
`;
exports[`platform/gitea/index initPlatform() should support custom endpoint 1`] = `
Object {
"endpoint": "https://gitea.renovatebot.com/",
"gitAuthor": "Renovate Bot <renovate@example.com>",
}
`;
exports[`platform/gitea/index initPlatform() should support default endpoint 1`] = `
Object {
"endpoint": "https://gitea.com/api/v1/",
"gitAuthor": "Renovate Bot <renovate@example.com>",
}
`;
exports[`platform/gitea/index initPlatform() should use username as author name if full name is missing 1`] = `
Object {
"endpoint": "https://gitea.com/api/v1/",
"gitAuthor": "renovate <renovate@example.com>",
}
`;
exports[`platform/gitea/index initRepo should fall back to merge method "merge" 1`] = `
Object {
"defaultBranch": "master",
"isFork": false,
}
`;
exports[`platform/gitea/index initRepo should fall back to merge method "rebase-merge" 1`] = `
Object {
"defaultBranch": "master",
"isFork": false,
}
`;
exports[`platform/gitea/index initRepo should fall back to merge method "squash" 1`] = `
Object {
"defaultBranch": "master",
"isFork": false,
}
`;