feat: Integrate duplicate slug advisory into ingest linting workflow
This commit is contained in:
parent
f703498fd9
commit
a843c30a9e
2 changed files with 15 additions and 1 deletions
|
|
@ -113,7 +113,14 @@ bash "${SCRIPTS}/log-append.sh" --type INGEST --subject "$slug" --model "$model"
|
|||
|| fail "log" "log-append failed"
|
||||
|
||||
# --- 3. scoped linter (capture findings for the PR; never aborts the run) ---
|
||||
lint_out="$( bash "${SCRIPTS}/scoped-lint.sh" "$genome" "${all_paths[@]}" 2>&1 )" && lint_rc=0 || lint_rc=$?
|
||||
# Point scoped-lint at the same manifest we were handed so its duplicate
|
||||
# advisory reads the right file even when a non-default path arrives as $2.
|
||||
# (The dedup check lives inside lib/lint.sh and is invoked by scoped-lint —
|
||||
# there is no separate check-duplicates.sh script.)
|
||||
export INGEST_MANIFEST="$manifest"
|
||||
lint_out="$(
|
||||
bash "${SCRIPTS}/scoped-lint.sh" "$genome" "${all_paths[@]}" 2>&1
|
||||
)" && lint_rc=0 || lint_rc=$?
|
||||
|
||||
# --- 4. assemble the PR body (manifest tables + lint results) ---
|
||||
body="$(mktemp)"
|
||||
|
|
|
|||
|
|
@ -49,6 +49,13 @@ for f in "$@"; do
|
|||
check_broken_links "$f" || true # warnings only
|
||||
done
|
||||
|
||||
# Cross-page duplicate advisory: runs ONCE over the whole manifest (not per
|
||||
# file) — it compares this run's created slugs against the index, so repeating
|
||||
# it for every file would only print the same warnings N times. Warn-only;
|
||||
# never affects the exit status. INGEST_MANIFEST lets run-ingest.sh point us at
|
||||
# a non-default manifest path; falls back to the conventional name otherwise.
|
||||
check_duplicates "${INGEST_MANIFEST:-.ingest-manifest.json}"
|
||||
|
||||
echo ""
|
||||
echo "scoped-lint: ${errors} error(s), ${stale} stale across ${count} file(s)"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue