fix: auto-no-squash inference for GitLab

When a GitLab MR is not squashed, `squash_commit_sha` will be `null`,
not `undefined`. Update `inferSquash()` to account for this.
This commit is contained in:
Ratchanan Srirattanamet 2024-10-07 09:43:00 +00:00
parent 6d6592f958
commit 568f2e47fc
8 changed files with 2231 additions and 1054 deletions

View file

@ -59,5 +59,6 @@ describe("check git utilities", () => {
expect(inferSquash(true, undefined)).toStrictEqual(false);
expect(inferSquash(false, "SHA")).toStrictEqual(true);
expect(inferSquash(false, undefined)).toStrictEqual(false);
expect(inferSquash(false, null)).toStrictEqual(false);
});
});