fix(pull-requests): missing features & better behaviour (#9188)
Co-authored-by: maria-rcks <[email protected]>
This commit is contained in:
1 parent
4ba39a6f40
commit
443b4ebfe8
34 files changed
+2241
-205
No files matched your search
@@ -192,6 +192,28 @@ describe("decodeMergeRequestDetailJson", () => {
|
||||
expect(armed({})).toBeUndefined();
|
||||
});
|
||||
|
||||
it("keeps the squash choice stored with auto-merge", () => {
|
||||
expect(
|
||||
expectSuccess(
|
||||
decodeMergeRequestDetailJson(
|
||||
detailJson({ auto_merge_enabled: true, squash_on_merge: true }),
|
||||
),
|
||||
),
|
||||
).toMatchObject({ autoMergeEnabled: true, autoMergeMethod: "squash" });
|
||||
|
||||
expect(
|
||||
expectSuccess(
|
||||
decodeMergeRequestDetailJson(
|
||||
detailJson({
|
||||
auto_merge_enabled: true,
|
||||
squash: true,
|
||||
squash_on_merge: false,
|
||||
}),
|
||||
),
|
||||
).autoMergeMethod,
|
||||
).toBeUndefined();
|
||||
});
|
||||
|
||||
it("keeps a divergence GitLab did not count apart from a divergence of none", () => {
|
||||
const behind = (entry: Record<string, unknown>) =>
|
||||
expectSuccess(decodeMergeRequestDetailJson(detailJson(entry))).divergedCommits;
|
||||
|
||||
Reference in new issue
Block a user