mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
fix: base first-push validation on dev
Validate / docs (push) Failing after 22s
Validate / provenance (push) Successful in 33s
Validate / process-gate (push) Failing after 36s
Validate / changes (push) Successful in 26s
Validate / hassfest (push) Failing after 17s
Validate / hacs (push) Failing after 21s
Validate / frontend (push) Successful in 4m44s
Validate / performance_smoke (push) Failing after 2m2s
Validate / smoke (push) Failing after 2m6s
Validate / backend (push) Failing after 9m11s
Validate / golden (push) Failing after 8m16s
Validate / docs (push) Failing after 22s
Validate / provenance (push) Successful in 33s
Validate / process-gate (push) Failing after 36s
Validate / changes (push) Successful in 26s
Validate / hassfest (push) Failing after 17s
Validate / hacs (push) Failing after 21s
Validate / frontend (push) Successful in 4m44s
Validate / performance_smoke (push) Failing after 2m2s
Validate / smoke (push) Failing after 2m6s
Validate / backend (push) Failing after 9m11s
Validate / golden (push) Failing after 8m16s
Issue: #165 User-Visible: no
This commit is contained in:
@@ -39,7 +39,7 @@ test('hook mode requires the executable index bit', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('validation range uses ancestry for PRs, normal pushes and new branches', () => {
|
||||
test('validation range uses PR ancestry, push before and dev for a new issue branch', () => {
|
||||
const calls = [];
|
||||
const runner = (args) => {
|
||||
calls.push(args);
|
||||
@@ -50,11 +50,13 @@ test('validation range uses ancestry for PRs, normal pushes and new branches', (
|
||||
}, runner), 'common-base..head');
|
||||
assert.deepEqual(calls.at(-1), ['merge-base', 'base', 'head']);
|
||||
assert.equal(resolveValidationRange({
|
||||
eventName: 'push', beforeSha: '000000', headSha: 'head', defaultBranch: 'main',
|
||||
// GitHub's default branch is main, but House Plan issue branches start at
|
||||
// dev. The all-zero first-push SHA must therefore compare with origin/dev.
|
||||
eventName: 'push', beforeSha: '000000', headSha: 'head',
|
||||
}, runner), 'common-base..head');
|
||||
assert.deepEqual(calls.at(-1), ['merge-base', 'refs/remotes/origin/main', 'head']);
|
||||
assert.deepEqual(calls.at(-1), ['merge-base', 'refs/remotes/origin/dev', 'head']);
|
||||
assert.equal(resolveValidationRange({
|
||||
eventName: 'push', beforeSha: 'before', headSha: 'head', defaultBranch: 'main',
|
||||
eventName: 'push', beforeSha: 'before', headSha: 'head', developmentBranch: 'dev',
|
||||
}, runner), 'common-base..head');
|
||||
assert.deepEqual(calls.at(-1), ['merge-base', 'before', 'head']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user