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:
@@ -425,7 +425,7 @@ function main(argv) {
|
||||
beforeSha: process.env.BEFORE_SHA,
|
||||
baseSha: process.env.BASE_SHA,
|
||||
headSha: process.env.HEAD_SHA,
|
||||
defaultBranch: process.env.DEFAULT_BRANCH,
|
||||
developmentBranch: process.env.DEVELOPMENT_BRANCH,
|
||||
}, (args) => git(args, repo).trim());
|
||||
}
|
||||
if (!range) {
|
||||
|
||||
@@ -79,7 +79,7 @@ function gitObjectExists(revision, runner = git) {
|
||||
}
|
||||
|
||||
export function resolveValidationRange({
|
||||
eventName, beforeSha, baseSha, headSha, defaultBranch,
|
||||
eventName, beforeSha, baseSha, headSha, developmentBranch = 'dev',
|
||||
}, runner = git) {
|
||||
if (!headSha) throw new Error('HEAD_SHA is required');
|
||||
if (eventName === 'pull_request') {
|
||||
@@ -90,7 +90,11 @@ export function resolveValidationRange({
|
||||
&& gitObjectExists(beforeSha, runner);
|
||||
const comparison = hasBefore
|
||||
? beforeSha
|
||||
: `refs/remotes/origin/${defaultBranch || 'main'}`;
|
||||
// A first push has an all-zero `before`. Issue branches are cut from the
|
||||
// integration branch, not GitHub's default branch (`main`), so comparing
|
||||
// with main would pull already-landed dev commits into the validation
|
||||
// range and judge unrelated/closed issues again (#165).
|
||||
: `refs/remotes/origin/${developmentBranch || 'dev'}`;
|
||||
return `${runner(['merge-base', comparison, headSha])}..${headSha}`;
|
||||
}
|
||||
|
||||
@@ -129,7 +133,7 @@ function main(argv) {
|
||||
beforeSha: process.env.BEFORE_SHA,
|
||||
baseSha: process.env.BASE_SHA,
|
||||
headSha: process.env.HEAD_SHA,
|
||||
defaultBranch: process.env.DEFAULT_BRANCH,
|
||||
developmentBranch: process.env.DEVELOPMENT_BRANCH,
|
||||
})
|
||||
: argv[rangeAt + 1];
|
||||
if (!range) throw new Error('--range requires a git revision range');
|
||||
|
||||
Reference in New Issue
Block a user