mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 21:33:19 +00:00
fix(ci): give the release mirror a recovery hint that works
With no push run for the dev head, the mirror now says to push a new commit to dev; a run started by hand is not a push run and never satisfied it.
This commit is contained in:
@@ -95,7 +95,7 @@ export function assess({ run, check, sha, elapsed, grace = GRACE_MS }) {
|
||||
return {
|
||||
done: true,
|
||||
ok: false,
|
||||
message: `No push run of ${WORKFLOW_FILE} on ${BRANCH} exists for ${sha}, so nothing tested this commit. Push it to ${BRANCH} (or run CI on ${BRANCH} again), then re-run this job.`,
|
||||
message: `No push run of ${WORKFLOW_FILE} on ${BRANCH} exists for ${sha}, so nothing tested this commit. Push a new commit to ${BRANCH} (a run started by hand is not a push run and does not count), then re-run this job.`,
|
||||
};
|
||||
}
|
||||
const where = run.html_url ?? `run ${run.id}`;
|
||||
|
||||
@@ -111,6 +111,8 @@ describe('mirror', () => {
|
||||
const result = await mirrorWith([{ runs: [] }]);
|
||||
assert.equal(result.ok, false);
|
||||
assert.match(result.message, /No push run of test\.yml on dev exists/);
|
||||
assert.match(result.message, /Push a new commit to dev \(a run started by hand is not a push run/);
|
||||
assert.doesNotMatch(result.message, /run CI on dev again/);
|
||||
assert.match(result.message, /re-run this job/);
|
||||
assert.ok(result.elapsed >= GRACE_MS && result.elapsed < GRACE_MS + 2 * INTERVAL_MS, String(result.elapsed));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user